Guest User

Untitled

a guest
Jun 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //Stop the Timeline
  2. stop();
  3.  
  4. //Create a delay timer for 5 miliseconds that is executed once
  5. var timer:Timer = new Timer(5,1);
  6.  
  7. //Add an event listener that calls once the timer is complete
  8. timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerHandler);
  9.  
  10. //Start the timer
  11. timer.start();
  12.  
  13. //Timer handler that is called once the delay timer is complete
  14. function timerHandler(event:TimerEvent){
  15.  
  16. //Go to and play the first frame
  17. gotoAndPlay(0);
  18. }
Add Comment
Please, Sign In to add comment