How do I repeat a function that starts immediately?
Hi,
I am using a Timer function to repeat a function however the function only begins (and repeats) after the period set eg. 5 seconds not immediately.
Here is an example of the code:
var myTimer:Timer = new Timer(2000,8);
myTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener (e:TimerEvent):void{
trace("Timer is Triggered");
}
myTimer.start();
Is there any way to make the function start immediately then repeat?
Thanks
Chris
