나는 게임 중입니다. 게임 플레이는 아주 작은 시간을 기반으로합니다 (액션을 수행하는 데 5 초 밖에 걸리지 않습니다). 내 타이머는 Flash Player에서 훌륭하게 작동합니다. 5 초가 걸립니다. 웹 브라우저 (파이어 폭스, 사파리 ..)에서 5 초 타이머는 이제 8 초입니다.플래시 게임 : getTimer가 정확하지 않음
해결 방법?
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();;
}
}
감사합니다 당신 : 내가 시간을 표시 곳 다음은 내 코드입니다!
이와 비슷한 문제가 있습니까? http://stackoverflow.com/questions/1014009/as3-how-accurate-are-the-gettimer-method-and-the-timer-class – MrKiane
아니요. Adobe에서 수정해야하는 것 같습니다. 프레임 속도가 프로세서를 기반으로하고 다를 수 있기 때문에 Timer를 넣은 것처럼 보입니다. –