How can I return a value from within a timer function? This doesn’t work:
if (timeOneSec()) {
doSomething ();
}
function timeOneSec ():Boolean {
var theTimer:Timer = new Timer (1000,1);
theTimer.addEventListener (TimerEvent.TIMER_COMPLETE, timerDone);
function timerDone (e:TimerEvent):Boolean {
return true;
}
}