Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to write the 2 dimensions? thanks 1

Status
Not open for further replies.

melnet

Programmer
Jul 8, 2003
77
HK
hello

my_array = new Array("a", "b", "c");
for (i=0; i<my_array.length; i++) {
my_array = new Array();
for (j=0; j<my_array.length; j++) {
trace(my_array[j] = j);
}
newline;
}

but not work.....
thanks...
 
If your talking about multidimensional arrays in Flash, check this:


Regards,

cubalibre2.gif
 
Try:

Code:
my_array = new Array(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;);
for (i=0; i<my_array.length; i++) {
	my_array[i] = new Array();
	for (j=0; j<my_array.length; j++) {
		my_array[i][j] = j;
		trace(my_array[i][j]);
	}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top