0
我正在进行问答游戏,涉及5个问题。我为第一个问题做了一个计时器,所以当用户在10秒内没有回答这个问题时,他们会回答问题2(另一个框架)。 问题1计时器工作正常,我如何得到问题2与问题1完全相同?我试图在问题2中添加相同的代码,但它给了我一个错误。
感谢多个计时器帮助! FLASH as3
我的代码:
stop();
var count:Number = 10;
var myTimer:Timer=new Timer(1000,2);
myTimer.addEventListener(TimerEvent.TIMER, countdown);
myTimer.start();
function countdown(event:TimerEvent):void {
count00.text=String((count)-myTimer.currentCount);
if(count00.text == "0"){
gotoAndStop(85);
}
}
myTimer.stop();
myTimer.removeEventListener(TimerEvent.TIMER, countdown);
TypeError:错误#1009:无法访问空对象引用的属性或方法。 \t在product_fla :: MainTimeline /倒计时() \t在flash.utils ::定时器/ _timerDispatch() \t在flash.utils ::定时器/蜱() – Jen 2013-03-07 12:47:05
我现在得到这个。怎么了? – Jen 2013-03-07 12:48:06
你之前得到什么错误? – M4tchB0X3r 2013-03-07 12:51:25