3 Replies Latest reply on May 14, 2013 5:52 PM by Ned Murphy

    stop(); doesn't work inside a movie clip

    Lotny123 Level 1

      Hi.

       

      I've been using this method for such a long time now, and it just drives me insane how it simply decided to stop working and is ruining my life!!! Let's say I created an animation inside a movie clip and I want it to stop when it finishes animating and stay there in the main animation. Usually I would just put stop(); at the very last frame inside the movie clip and it would normally stop. But now flash completely ignores the script and the animation disappears as soon as it finished animating.

       

      What is wrong, can someone help me?!

      Thanks.

       

      PS. Flash 8 Professional

        • 1. Re: stop(); doesn't work inside a movie clip
          Ned Murphy Adobe Community Professional & MVP

          There could be a number of reasons but they are all design-based... otherwise your file has caught a bug.

           

          Check to make sure the stop() is in the last frame and that the last frame has content in it.  Make sure there is no other code in the main timeline that deals with the _visible or _alpha property of this mc.

          1 person found this helpful
          • 2. Re: stop(); doesn't work inside a movie clip
            Lotny123 Level 1

            What do you mean by "design-based" ?

            I can say 'check' to all the points, I have checked this script and everything else about bagillion times. Maybe another script could help? For example, I was wondering how to - inside of a movie clip - pause the animation and then resume it? In my case it's a piece of text that I want to pause for a few seconds, so the user can read it, and then continue on playing so it slowly fades away in a few frames. How can I do that?

             

            Thanks.

            • 3. Re: stop(); doesn't work inside a movie clip
              Ned Murphy Adobe Community Professional & MVP

              By design-based I mean it is designer-error-based.  Something that was done that is causing the problem... unless a file is corrupt, it will be a design issue because a stop(); command will not fail.

               

              To pause you first need to use stop();  Then you need to start some kind of timing function to delay for the desired time before initiating a play(); command.  Your options are setTimeout or setInterval.  I recommend setTimeout if you are not repetitively introducing delays.