var a:Timer=new Timer(1000,10); /* Timer构造器函数传入的参数是a.delay(计时器事件间的延迟)和a.repeatCount(计时器运行总次数) 或者可以只传入一个参数,然后将另一个参数定义成Timer的属性,如下: a.delay=1000; a.repeatCount=10; */ a.addEventListener(TimerEvent.TIMER,yunxing); a.addEventListener(TimerEvent.TIMER_COMPLETE,jieshu); function yunxing(evt:TimerEvent):void { trace("当前已运行的次数:"+a.currentCount); } function jieshu(evt:TimerEvent):void { trace("计时结束!"); } a.start();