Flash游戏:getTimer uncurate
我正在做这个游戏。游戏是基于一个非常小的时间间隔(你只有5秒的时间来做一个动作)。 我的计时器在Flash Player中工作得很好,我有5秒钟的时间。在网络浏览器(firefox、safari等)中,5秒计时器现在是8秒 如何解决这个问题? 这是我的代码,我在其中显示时间: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
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必须纠正这一点。这似乎是计时器被放置,因为帧速率是基于处理器的,可以是不同的。我会看看这些链接!谢谢我将查看这些链接!谢谢