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.

ASv1.


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. }
  7.  
  8. //at the end of the animation or between of your animations
  9. stop();
  10. pauseInt = setInterval(playMovie, delay);

URL: http://www.actionscript.org/forums/showthread.php3?t=16467&page=2

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.