3 Replies Latest reply on Feb 10, 2007 3:16 PM by katrus

    movie clip control

      We ran into a problem of movie clip control flow. Basically, we are trying to make a sequence of movie clips play in a certain order that is determined at run time. We need the first movie clip to play and the next one wait till the first one is done, then play the second one, and the third one will wait until the second one is done etc, till the end of the sequence. Is there a function such as "wait' or "sleep" for the waiting movie clips, or is there a way to find out when the movie clip is done playing? Can someone, please, share any insight on how to go about doing this? Thank you very much in advance for any comments!
        • 1. Re: movie clip control
          kglad Adobe Community Professional & MVP
          you can either start a loop that continually checks if the previous movieclip has completed play, use the watch() function to check if it's completed or start the next movieclip using code on the previous movieclip's last frame.
          • 2. movie clip control
            sly one Level 1
            There are some built-in properties that allow you to play, stop and track when a MovieClip has reached the end of it's timeline. First, there are stop() and play() methods that allow you to dynamically play/stop MovieClips. Then you can use an if statement to check when a clip is at the last frame(meaning it's done playing), something like this will detect when the MovieClip "my_mc" has reached the last frame:

            if(my_mc._currentframe == my_mc._totalframes){
            //play the next mc

            and yes it would have to be in some kind of onEnterFrame or setInterval loop.
            • 3. Re: movie clip control
              katrus Level 1
              Thank you very much! I will try that out.