Hi I am trying to get this simple logic to work correctly. Right now, the trace is:
int 0
int 0
int 0
int 0
I am trying to get this to trace:
int 0
int 1
int 0
int 1
I am trying to set timers to go off back to back shortly after each other while passing through a parameter from an array.
function testFunc(e:Event,numb:int)
{
trace("int " + numb);
}
var newset:Array = [0,1,0,1];
for( var i:int = 0 ; i <= newset.length - 1 ; i++ )
{
if(i > 0)
{
timing = timing + 1000;
}
var timer = new Timer(timing, 1);
timer.addEventListener(TimerEvent.TIMER, function(e:Event){ testFunc(e, newset*) });
timer.start();
}