You can have as many numbers of timers as you want in your application. Just initialize them as if you'd initialize any other timer. Post the code you tried and we might be able to fix the issue.
var t1:Timer = new Timer(1000, 0);
t1.addEventListener(TimerEvent.TIMER, timerHandler1);
t1.start();
var t2:Timer = new Timer(500, 0);
t2.addEventListener(TimerEvent.TIMER, timerHandler2);
t2.start();
public function timerHandler1(event:TimerEvent):void {
trace("First timer triggered");
}
public function timerHandler2(event:TimerEvent):void {
trace("Second timer triggered");
}
It is not mandatory to use separate listeners; you can as well do:
public var t1:Timer;
public var t2:Timer;
t1 = new Timer(1000, 0);
t2 = new Timer(200, 0);
t1.addEventListener(TimerEvent.TIMER, timerHandler);
t2.addEventListener(TimerEvent.TIMER, timerHandler);
public function timerHandler2(event:TimerEvent):void {
if(event.target == t1)
trace("first timer");
else
trace("second timer");
}