var _value:Number = 0;
var _autoTimer:Timer = new Timer(딜레이 시간, 반복횟수)
autoTimer.addEventListener(TimerEvent.TIMER, autoFunc)
autoTimer.start();
function autoFunc (e:TimerEvent):void{
_value++;
trace(_value); // 1, 2, 3, 4,....................
}
Timer(1000, 5); // 밀리초로 계산된다.(1000 = 1초, 2000 = 2초, 500 = 0.5초)
// 반복횟수 : 5 -> 몇번 반복할것인가를 정한다. (5 = 5번 반복, 10 = 10번 반복)
var _autoTimer:Timer = new Timer(딜레이 시간, 반복횟수)
autoTimer.addEventListener(TimerEvent.TIMER, autoFunc)
autoTimer.start();
function autoFunc (e:TimerEvent):void{
_value++;
trace(_value); // 1, 2, 3, 4,....................
}
Timer(1000, 5); // 밀리초로 계산된다.(1000 = 1초, 2000 = 2초, 500 = 0.5초)
// 반복횟수 : 5 -> 몇번 반복할것인가를 정한다. (5 = 5번 반복, 10 = 10번 반복)
'ActionScript3.0 > 기초' 카테고리의 다른 글
TextInput 에 마스크 먹이기~ (0) | 2010.06.22 |
---|---|
텍스트 필드에 포커스 이동하기. (0) | 2010.04.15 |
Math.random(), TweenMax.DropShadowFilter (0) | 2010.02.09 |
Sprite (0) | 2010.02.09 |
mouseEnabled (0) | 2010.02.04 |