Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Re: AS3 Multidimensional Array

$
0
0

You will need to use two loops if you want a 2 dimensional array, one nested inside the other.  The first loop will create the individual arrays and the second will assign the elements to each.

 

 

var mArray:Array = new Array();

 

for(var i:int=0; i<8; i++){

    mArray[i] = new Array();

    for(var k:int=0; k<8; k++){

          mArray[i].push(whichever color you intend);

    }

}


Viewing all articles
Browse latest Browse all 92406

Trending Articles