if you want to stop a particular movieclip you must reference that movieclip by path/instance name. if you want to stop them, attached to your button you can use: on(press){ stopAllMovies(_root); } and attached to a frame: function stopAllMovies(mc){ mc.stop(); for(obj in mc){ if(typeof(mc[obj])=="movieclip"){ stopAllMovies(mc[obj]); } } }
Thanks for your reply. I'll give it a shot. I'm assuming that the first actionscript you mentioned will stop any movie clip that might be playing. The second one seems a bit beyond my grasp at the moment. Appreciate the help. Doc
the two bits of code accomplish one thing: to stop all movieclips. the first snipet is attached to a button and the 2nd to a frame, but they work together with the button handler invoking the function defined in the 2nd snipet.
The button the 1st snippet is attached to is on screen throughout all the frames and can be activated ata any time. Which frame do I attach the second snippet to? Do I put it on a frame at the end of the movie with a label and direct the button click to that particular frame?
no, the 2nd snippet needs to be in a frame that is played NO LATER than when the button might be first pressed. generally, you would put that code on frame 1 on the timeline that contains the button (which is probably the _root timeline).
Don't see what you're looking for? Try a search.
|