I have shortened this example to keep it simple, otherwise I wouldnt be doint this
I need to pass different variables to function inForLoop each time.
function someFunction():void {
for (var i:int = 0; i < columns; i++) {
for (var j:int = 0; j < rows; j++) {
inForLoop(i, j);//this is fine
}
}
for (var m:int = 0; m < columns; m++) {
for (var n:int = 0; n < rows; n++) {
inForLoop(m, n);//ofcourse function inForLoop wouldnt accept this
}
}
for (var p:int = 0; p < columns; p++) {
for (var r:int = 0; r < rows; r++) {
inForLoop(p, r);//nor this
}
}
}
function inForLoop(i:uint, j:uint):void {
holder.x = i * IMAGE_PIECE_WIDTH;
holder.y = j * IMAGE_PIECE_HEIGHT;
}
How could I make this work?