I am trying to set up a script that will generate a matrix repeating the same symbol X by Y times. For example, b(3,2); should generate…
OOO
OOO
…and after many days of being tested by this problem I have narrowed the location of my problem down to what can be seen up in the following.
for (a=0; a<4; a++){
for (b=0; b<4; b++){
var z:Number = ((a*4)+b);
_root.attachMovie("Light", ("L" + z), _root.getNextHightestDepth(), {_x:(a*45), _y:(b*45)});
}
}
For some reason, that loop will only attach one copy of my “Light” movie. I cannot seem to figure out why more are not added. I am putting that code on the first frame of my movie. There is nothing else in my project yet.
I have compared my array to http://www.kirupa.com/developer/actionscript/multiDimArrays_attach.htm but I am still unable to find the problem. Any help is greatly appreciated.