Timer isn't displaying count down in text label, why?
Code for timer:
var oneSecTimer:Timer = new Timer (1000,60);
oneSecTimer.start();
oneSecTimer.addEventListener(TimerEvent.TIMER , timerListener );
oneSecTimer.addEventListener(TimerEvent.TIMER_COMPLETE , onTimerComplete );
function timerListener (event:TimerEvent):void {
secs.text.text = oneSecTimer;
}
function onTimerComplete (event:TimerEvent):void {
gotoAndStop(5);
开发者_运维百科days=days+1;
}
When I run the movieclip I get, where the timer is supposed to be showing the countdown, a "[object timer]" message instead. Does anyone know why?
function timerListener (event:TimerEvent):void {
secs.text.text = oneSecTimer.currentCount;
}
Rob
精彩评论