Hello,
There's 3 boxes I'm indexing through with a timer. They disappear in sequence. How do I make them reappear?
Thanks
boxes disappear in sequence 1-3
var pink:Array = ["","boxInstance1","boxInstance2","boxInstance3"];
var timer:Timer = new Timer(555);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(evt:TimerEvent):void {
var counting:*;
counting = String(timer.currentCount %10);
trace(counting);
//TIMER LOOPS THROUGH MY ARRAY
this[pink[counting]].visible = false;
}
I tried this 'it didn't work'
//THIS IS OK
if(counting> 0){
this[pink[counting]].visible = false;
}
//'null object ref #1010'
if(counting> 6){
this[pink[counting]].visible = true;
}
I'm not to particular about the sequence they disappear and appear, but it need to keep going in a loop.