Pretty new to javascript. The following code works perfectly for me. It is a reset button on a grid of 100 boxes. Each box is a movie clip called box1, box2 etc. On mouse release the simple loop operates to return all movie clips to first frame.
function mouseReleased() {
for (var i = 1; i < 101; i++) {
eval("box" + i).gotoAndStop(1);
}
}
I have read a number of ways of replacing eval in this forum but I don't know enough javascript to apply them to my situation!