혹시 이 문제 해결하신분 계신가요?
Is anybody know this problem?

코드는 다음과 같습니다.
See the following.

import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.events.MouseEvent;
import flash.utils.getTimer;

var timer: Timer = new Timer( 3 * 1000, 2 );
timer.addEventListener( TimerEvent.TIMER, tick );
timer.addEventListener( TimerEvent.TIMER_COMPLETE, complete );
timer.start();

var time: int = getTimer();

trace( "start : " + time );

function tick( $e: TimerEvent ): void
{
     trace( "tick : " + ( getTimer() - time ) );
}

function complete( $e: TimerEvent ): void
{
     trace( "complete" + ( getTimer() - time ) );
}

this.stage.addEventListener( MouseEvent.CLICK, click );

function click( $e: MouseEvent ): void
{
     this.stage.frameRate = 0.1;
    
     trace( "frame rate!!" );
}

문제는 이겁니다.
Here is a problem.

Timer 는 delay를 3초로 맞춰놓고 두번 돌게 되어 있습니다.
Timer was set to 3 second delay for twice.

근데 그 사이에 frame rate을 변경시키면 타이머가 제시간에 움직이지 않습니다.
But if you change frame rate during timer is working, it doesn't tick at correct delay.

혹시 이 문제 경험하시거나 해결법 아시는 분 계신가요?
Is there anybody who knows the solution or expirenced?

+ Recent posts