
Код AS3:
package
{
import flash.events.TimerEvent;
import flash.utils.Timer;
public class Interval
{
private var timer:Timer;
private var count:int;
private var i:int;
public function Interval()
{
count = 3;
i = 1;
timer = new Timer(5000, count);
timer.addEventListener(TimerEvent.TIMER, out);
timer.start();
}
private function out(e:TimerEvent = null):void
{
i++;
trace(i);
}
}
}
Добавлено через 41 секунду
Не успел)