我正在尝试为计时器使用一些代码并在计时器事件完成后执行某些操作,但代码无法正常工作。
import flash.net.*;
import flash.events.Event;
import flash.display.DisplayObject;
import flash.utils.Timer;
import flash.events.TimerEvent;
var STATE_TIMER:Timer = new Timer(6000,100);
STATE_TIMER.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener (e:TimerEvent):void
{
trace("SMS_SENDER(); Timer Executed.");
SMS_SENDER();
}
STATE_TIMER.addEventListener(TimeEvent.TIMER_COMPLETE, timerDone);
function timerDone(e:TimerEvent):void{
trace("Timer finished!");
}
输出:
Scene 1, Layer 'STORE2', Frame 77, Line 15, Column 30 1120: Access of undefined property TimeEvent.