很简单的,代码如下:
1秒钟运行2次:
import flash.utils.Timer; import flash.events.TimerEvent; var myTimer:Timer = new Timer(1000, 2); myTimer.addEventListener("timer", timerHandler); myTimer.start(); function timerHandler(event:TimerEvent):void { trace("timerHandler: " + event); }