开发者

Timer isn't displaying count down in text label, why?

开发者 https://www.devze.com 2023-02-20 13:49 出处:网络
Code for timer: var oneSecTimer:Timer = new Timer (1000,60); oneSecTimer.start(); oneSecTimer.addEventListener(TimerEvent.TIMER , timerListener );

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

精彩评论

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

关注公众号