Skip to main content
Known Participant
July 6, 2009
Question

I want to stop in frame 1

  • July 6, 2009
  • 1 reply
  • 388 views

I want to stop every action on keyframe  1. I have so many movie clip on layer 1 and layer 2 and so on. Now, I want to stop all movie cip.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
July 6, 2009

i posted a stop all function in the as3 forum a few weeks ago.  see if you can find it using the search in this forum.

nepaliktoAuthor
Known Participant
July 6, 2009

Ya , I know that post of stopping Movie Clip.  There stop action was done with the reference of movie clip. Ex :

myClip.stop();. But I need to stop entire whole movieclips and every action of display object even child display object.. Is it possible ? If u do not understand plz let me know

kglad
Community Expert
Community Expert
July 6, 2009

that's what i posted.

here it is again:

stopAllF(MovieClip(root),true);

function stopAllF(mc:MovieClip,bool:Boolean){
    if(bool){
        mc.stop();
    } else {
        mc.play();
    }
    for(var i:uint=0;i<mc.numChildren;i++){
        if(mc.getChildAt(i) is MovieClip){
            stopAllF(MovieClip(mc.getChildAt(i)),bool);
        }
    }
}