Wednesday, October 20, 2010

add a time to your animation

Add a timer in Actionscript 3.0
_____________________________________________________

var tmrDisplay:Timer;                                            //  make a timer
tmrDisplay=new Timer(10);                                   //    amout of time that will pass before time .1 of a second
tmrDisplay.addEventListener(TimerEvent.TIMER, updateDisplay);     //     add listener for event
tmrDisplay.start();                                                //     start the timer

function updateDisplay(e:TimerEvent):void                        //     ever you want to happen

{

trace ("working")
       
}

No comments:

Post a Comment