Creating/populating a 2d/multidimensional array

I suppose this is an easy question but I can’t seem to get it to work.
How does one create and populate a 2d array in flash?

I am first defining the array with:

some_array = [],[];

and then im populating it with xml data with a loop like this:

for (c=0; c<5; c++) {
some_array[i,c] = xmlNode.childNodes*.firstChild.nodeValue;
            }

please assume that this code exists in another for loop which loops i
also please assume that 5 is my total list of entries in the xml file
i simplified my code for posting.
i just want to know what the proper synax is for populating this 2d array.
also how do i access it? array [i,c]?

right now whats happening is the array does fill up but only with the last values. so obviously something isnt right.

hmm ok nevermind. i think i got it. i used this guy EliteMX’s code which I found here:
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=Part4_ASLR2.html
good luck to anyone doing this :slight_smile:

you know, it seems as though this code is flawed after-all.
it works, in that the array does get populated, but im having a problem pulling data from it for use in a transitions.easing call…

so once again, i ask, what is the proper way to define, populate, and call a 2d array in actionscript?

myArray = new Array();

for(i=0;i<20;i++){
myArray* = “variable”;
}

use ctrl+shift+enter to publish the .swf in debug mode then you can check how your array has been populated by pressing the play button (to play the movie, dah!) then click _level0 (root) or wherever the array is stored. Then click the Variables tab you should see the name of the array then click the “+” icon and you will be able see what values your array has.

phew hope that helps!