Defers the call to the deferredMethod( ) method for five seconds : Timer : Animation Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Animation » Timer »

 

Defers the call to the deferredMethod( ) method for five seconds


 


package{
  import flash.display.Sprite;
  import flash.utils.*;
  import flash.events.*;
  
  public class Main extends Sprite{
    public function Main(){

        var timer:Timer = new Timer(50001);
        timer.addEventListener(TimerEvent.TIMER, deferredMethod);
        timer.start(  );

    }
    function deferredMethod(event:TimerEvent):void {
          trace("on timer");
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Animation
» Timer