When using countdown timer i can only see the number 4 appearing in Flash
as3?
I'm making a app in flash and i have a countdown timer. It starts at 60
seconds and goes down to zero but i can only see the number 4 appearing
from numbers like 54, 44, 40, 34, 24, 14 and 4. I have tried this code
separately on a another blank scene and it works but not on my app.
'myText_txt' is an instance name of dynamic text box. Help Please.
var count:Number = 60;
var myTimer:Timer = new Timer(1000,count);
myTimer.addEventListener(TimerEvent.TIMER, countdown);
myTimer.start();
function countdown(event:TimerEvent):void {
myText_txt.text = String((count)-myTimer.currentCount);
}
No comments:
Post a Comment