Simple Time Delay

/ Published in: ActionScript
Save to your folder(s)

I was looking for a simple time delay in ActionScript, and I found this one to be useful (and working). The logic is plain simple to understand.


Copy this code and paste it in your HTML
  1. //at frame 1
  2. delay = 5000; //milliseconds
  3. function playMovie() {
  4. gotoAndPlay(_currentframe + 1);
  5. clearInterval(pauseInt);
  6. }
  8. //at the end of the animation or between of your animations
  9. stop();
  10. pauseInt = setInterval(playMovie, delay);


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.