Accessing a movieclip on another level

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?

_level[j], and squaremc[j], thats wrong. first, thats just, umm, wrong. thats wrong syntax. second, you dont even need that. you attached them all to the same level. try something like… this:

for (var j=0; j<96; j++) {
  trace(this["squaremc"+j]._x);
}

thats assuming you run this code at the same level of the code that duplicated them.