【发布时间】:2012-08-14 09:35:31
【问题描述】:
所以,我在 2 个场景中有这个计时器。第一个场景中的计时器完美运行。然而,当我尝试到第二个场景时,计时器变得如此之快。 我有 2 组代码:
_root.timer = 10;
clearInterval(id);
id = setInterval (function ()
{
_root.timer--;
if(timer==0)
{
gotoAndStop(65);
}
}, 1000);
还有这个:
timer = 10;
timer.text= timer;
countdown = function(){
timer--;
if(timer==0){
clearInterval(countdownInterval);
gotoAndStop(65);
}
}
countdownInterval = setInterval(countdown,1000);
我知道 1000 毫秒 = 1 秒。我只是不知道是什么导致计时器在第二个场景中快速减少。你怎么看?
【问题讨论】:
标签: javascript actionscript actionscript-2 flash-cs5