Hey guys, i’m having a problem doing this, i have a timer in a timer, but it only runs once, after the first time only the second timer works
var rolltime:Timer = new Timer (5000);
rolltime.addEventListener(TimerEvent.TIMER ,rollnow);
rolltime.start();
function rollnow(event:TimerEvent):void
{
rolltime2.start();
}
var rolltime2:Timer = new Timer (5000,4);
rolltime2.addEventListener(TimerEvent.TIMER ,rollnow2);
function rollnow2(event:TimerEvent):void
{
change_question();
}
So how should I do this in order to when the second timer ends it will only start after the first one ?
I need something like this:
First Timer -> Second Timer -> change_question();
First Timer -> Second Timer -> change_question();
First Timer -> Second Timer -> change_question();
First Timer -> Second Timer -> change_question();
And what i think it’s happening is this:
First Timer -> Second Timer -> change_question(); (10 secs)
Second Timer -> change_question(); (5 secs)
Second Timer -> change_question(); (5 secs)
Second Timer -> change_question(); (5 secs)
Tks in advance