Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flash游戏:getTimer uncurate_Flash_Actionscript 3_Time_Timer - Fatal编程技术网

Flash游戏:getTimer uncurate

Flash游戏:getTimer uncurate,flash,actionscript-3,time,timer,Flash,Actionscript 3,Time,Timer,我正在做这个游戏。游戏是基于一个非常小的时间间隔(你只有5秒的时间来做一个动作)。 我的计时器在Flash Player中工作得很好,我有5秒钟的时间。在网络浏览器(firefox、safari等)中,5秒计时器现在是8秒 如何解决这个问题? 这是我的代码,我在其中显示时间: private function updateTimer(e:TimerEvent) { if (this.timer.currentCount < 500) { var cen

我正在做这个游戏。游戏是基于一个非常小的时间间隔(你只有5秒的时间来做一个动作)。 我的计时器在Flash Player中工作得很好,我有5秒钟的时间。在网络浏览器(firefox、safari等)中,5秒计时器现在是8秒

如何解决这个问题? 这是我的代码,我在其中显示时间:

private function updateTimer(e:TimerEvent) 
{
    if (this.timer.currentCount < 500) 
    {
         var centiemes:int = 100 - Math.floor(this.timer.currentCount) % 100;
         var secondes:int = 4 - Math.floor(this.timer.currentCount / 100) % 60;

         this.txtTemps.text = ToolBox.zeroFill(secondes.toString(), 2) + ":" +  ToolBox.zeroFill(centiemes.toString(), 2);
    }
    else 
    {
          this.txtTemps.text = "00:00";
          this.timer.stop();;
     }
 }
私有函数更新程序(e:TimerEvent)
{
如果(this.timer.currentCount<500)
{
var centiemes:int=100-数学地板(this.timer.currentCount)%100;
var秒数:int=4-数学地板(this.timer.currentCount/100)%60;
this.txtemps.text=ToolBox.zeroFill(secondes.toString(),2)+“:”+ToolBox.zeroFill(centiemes.toString(),2);
}
其他的
{
this.txtemps.text=“00:00”;
this.timer.stop();;
}
}

谢谢你

是计时器和设置间隔不准确


要获得准确的时间,您可以计算帧与时间之间的增量,也可以使用Audiotool团队使用的技术处理音频文件。您可以找到更多信息。

是计时器和设置间隔不准确


要获得准确的时间,您可以计算帧与时间之间的增量,也可以使用Audiotool团队使用的技术处理音频文件。您可以找到更多信息和。

与此相同的问题?不,似乎Adobe必须纠正这一点。似乎是因为帧速率是基于处理器的,所以计时器被设置为不同的。与此相同的问题吗?不,似乎Adobe必须纠正这一点。这似乎是计时器被放置,因为帧速率是基于处理器的,可以是不同的。我会看看这些链接!谢谢我将查看这些链接!谢谢