Advertisement
Switchy32

Untitled

Jul 4th, 2018
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import flash.utils.Timer;
  2. import flash.events.TimerEvent;
  3.  
  4. timer2.visible = false;
  5.  
  6. var fl_TimerInstance:Timer = new Timer(1000,4);
  7. fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler);
  8. fl_TimerInstance.start();
  9.  
  10. var fl_SecondsElapsed:Number = 3;
  11.  
  12. function fl_TimerHandler(event:TimerEvent):void
  13. {
  14.     timer1.text = ("Seconds elapsed: " + fl_SecondsElapsed);
  15.     fl_SecondsElapsed--;
  16.    
  17.     if(fl_SecondsElapsed <0)
  18.     {
  19.         timer2.visible = true;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement