var mcTimer:Timer = new Timer(7000, 10);
mcTimer.addEventListener(TimerEvent.TIMER, timerHandler);
mcTimer.start();
public function timerHandler(event:TimerEvent):void {
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//宣告間隔七秒執行一次
var mcTimer:Timer = new Timer(7000);
mcTimer.addEventListener(TimerEvent.TIMER, timerHandler);
mcTimer.start();
public function timerHandler(event:TimerEvent):void {
}
//需要停止Timer的話, 用這個
mcTimer.stop();
// use interval----------------------------------------------------------------------------
// use interval----------------------------------------------------------------------------
var intervalId:uint;
intervalId = setInterval(ShowItemInfo, 7000);
//停止執行
No comments:
Post a Comment