I have the following code, which takes a movieclip, square, and duplicates it to square0, square1 etc etc…
xgridlines = 10;
ygridlines = 10;
distance = 60;
setProperty ("square", _visible, false);
k = 0;
for (j=0; j<=xgridlines; j++) {
for (i=0; i<=ygridlines; i++) {
duplicateMovieClip ("square", "square"+k, k);
setProperty ("square"+k, _x, distance*i);
setProperty ("square"+k, _y, distance*j);
k++;
}
}
What I want to do is click on one of the squares, and replace the white square with an image loaded from an array. Can anyone help?
I tried putting an onClipEvent(mouseDown) handler into the loop, but it threw up an error.
Thanks,
Dave