I have a flash presentation which has lots of movie clips, tweens and graphics (some movie clips within movie clips) - its a 5 minute presentation. I need to have a pause button on the main stage !!! Need help on how to get this one done !?!
My parent movie clip (scene 1) is like this - it has 190 frames but on one of the layer in the last frame it calls another movie clip which has 13000 frames !! now if i stop all movie clips on the parent scene, it still plays the 13000 frames movie clip !!
should i call all the movie clips in the library to stop (i've got thousands of mc's
Here's one way to do it...it'll be easiest if you name the instances (NOT the symbol name, the Instance...in the properties panel when you select it on the stage) something like mc1, mc2, mc3, then you can use a loop to hit them all...see the sample...
And, you have to put the audio in a movieclip and set it to stream and then you can control the audio by controlling that movieclip. Otherwise, you have to use the Sound class.
Hope that helps!!
Last edited by flashpipe1; 09-10-2007 at 01:30 PM.
Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.
create functions on frame#1 of the main timeline and use when needed.
this example uses a single button to toggle between stop / start -
Code:
_global.stopAll = function (j) {
var i = 0;
for (i in j) {
if (typeof (j[i]) == "movieclip") j[i].stop();
if (j != j[i]) _root.stop();
}
};
_global.startAll = function (j) {
var i = 0;
for (i in j) {
if (typeof (j[i]) == "movieclip") j[i].play();
if (j != j[i]) _root.play();
}
};
bToggle.onRelease = function(){
toggled ? startAll(_level0) : stopAll(_level0);
toggled = !toggled;
};
change the functions to these to start/stop the nested clip -
Code:
_global.stopAll = function (j) {
var i = 0;
for (i in j){
if ((typeof (j[i]) == "movieclip") && (j != j[i])) {
stopAll(j[i]);
j[i].stop();
}
}
};
_global.startAll = function (j) {
var i = 0;
for (i in j){
if ((typeof (j[i]) == "movieclip") && (j != j[i])) {
startAll(j[i]);
j[i].play();
}
}
};
bToggle.onRelease = function(){
toggled ? startAll(_level0) : stopAll(_level0);
toggled = !toggled;
};
But when the "contact us" finishes its tween and when its sitting static (idle), now when you press the toggle button, the arrow pauses, when you press the toggle button again, the arrow plays and along with it the "contact us" starts to tween again !! - do you get me?! The contact us should just tween once and never again - when you press the toggle button.