Posted By

webStruck_ on 03/06/08


Tagged

time flash simple pause delay stop continue


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

jeve75
eme_dlr


Simple Time Delay


 / Published in: ActionScript
 

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

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.

  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);

Report this snippet  

You need to login to post a comment.