Hi. i made this code to dynamically create a menubackground of square tiles. I had no problem here…but then when i try to access them i dont seem to succeed…dont know how too.
heres the first code creating the tilepattern…
amount = 0;
row = 0;
horiz = 0;
vert = 0;
i = 0;
while (amount<24 && row<4) {
duplicateMovieClip (_root.square, “squaremc”+i, i);
setProperty (“squaremc”+i, _x, horiz);
setProperty (“squaremc”+i, _y, vert);
setProperty (“squaremc”+i, _alpha, random(100));
i++;
horiz += 26;
amount++;
if (amount == 24){
amount = 0;
vert += 26;
horiz = 0;
row += 1;
}
}
then i tried to use THIS code to access each and everyone of the
movieclips
for (j=0; j<96;j++){
trace(_level[j].squaremc[j]._x);
}
the trace says its undefined. whats wrong?