Hi im trying to create a 2d array in flash and the fact that im a C++ programmer isnt helping me so im a little lost here.
Ive searched the forums and found something like this
[FONT=Courier New][LEFT][COLOR=#000000]var[/COLOR] urls:[COLOR=#0000FF]Array[/COLOR]=[COLOR=#000000]new[/COLOR] [COLOR=#0000FF]Array[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#0000FF]for[/COLOR]COLOR=#000000[/COLOR]
[COLOR=#000000]{[/COLOR]
urls[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000FF]Array[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#0000FF]for[/COLOR]COLOR=#000000[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]
However when i put it in the trace returns undefined.
I am looking to create something like a 14 x 14 2D grid where all the variables inside are 0 at the beginning.
I did something like so
myArray = newArray();
for(int i =0; i< 14;i++){
for(int k =0; k< 14;k++){
myArray*[k] =0;
}
}
But unfortunately it doesnt work.
Please advise, thanks in adv!