On Oct 31, 2005, at 7:22 AM, cornel wrote:
hi
maybe a silly question, but here i go anyway:
how would you write something like this in actionscript:
int matrix[3][3];
for(i=0;i<3;i++)
for(j=0;j<3;j++)
matrix[i][j]=0;
i've done something like this in my code, mtasc doesnt complained, but
the program doesnt work, and i have a feeling that something wrong.
i would appreciate any help
cornel
Unlike C, Actionscript can't create a two-dimensional array like that.
var matrix = [];
for (;i<3;i++) matrix[i] = [0];
That's the super shorthand way of doing it.
cheers,
Jon
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders