1 Reply Latest reply on Sep 10, 2014 10:53 AM by Ned Murphy

    How to stop animation at 30 second using Flash CS6??

    9870172

      Hi!

      I would like to know how to create that my animation stops after 30 seconds.

       

      I'm creating animation in Flash CS6. I use flash player 9 & ActionScript 2.0

      In my animation are 25 frames, that's 1 second. I would like that my animations loops all the time and then at 30 second it stops.

      I'm beginner in flash, so i would like to know what should i need to do, to create that my animation stops after 30 second.

       

      Thanks everyone!

        • 1. Re: How to stop animation at 30 second using Flash CS6??
          Ned Murphy Adobe Community Professional & MVP

          If one loop is one second, one way would be to have a loop counter that counts to 30, though that would likely be the least accurate approach since the actual frame rate can vary depending on what is being processed.

           

          Another way would be to use the setTimeout() function and have it start timing out when the animation starts and then when it reaches the 30 second timeoput value (30000 msec), it stops the animation in whatever frame it is in.

           

          Another approach would be to use the getTimer() function, checking it contnuously until it reaches the 30 second value and then triggering a stop() command to stop the animation in whatever frame it is in.

          1 person found this helpful