开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜