Timer sample (Zamanlayıcı)

var timer:Timer = new Timer(1000, 25); // 1000 = 1 sec
timer.addEventListener(TimerEvent.TIMER, timerF);

function timerF(e:TimerEvent):void
{
trace("Repeat: " + e.currentTarget.currentCount);
trace("Time: " + e.currentTarget.delay);
myScreen.htmlText = "<b>Repeat: </b>" + e.currentTarget.currentCount;
myScreen.htmlText += "<b>Time: </b>" + e.currentTarget.delay;
}

timer.start();
//timer.stop();

timer.zip (13KB)

Keywords:

flash, timer, time, sample, basic, delay, count, auto, as3, actionscript3


All Resources