0
안녕하세요, 저는 이것을 몇 시간 동안 해봤지만 여전히이 기능을 루프 할 수는 없지만 적어도 5 번 반복해야합니다. 그러나 한 번만 반복합니다. 하지 while 루프, 루프 사용하고있는 동안을,하지만 여전히 그것은 것입니다액션 스크립트에서 함수 루핑하기
var myTimer:Timer = new Timer(1000); // 1 second
myTimer.addEventListener(TimerEvent.TIMER, runMany);
myTimer.start();
function runMany(event:TimerEvent):void {
myTimer.stop();
myTimer.start();
trace("runMany() called @ " + getTimer() + " ms");
if(getTimer() > 3000)
{
//random call of captopn and costumer in 3 seconds
myTimer.stop();
capsChoice = randomRange(1, 3);//random caption
costumChoice = randomRange(1, 3);//randomcostum
//condition in caption
more codes in here………...
}
}