Now I didn't test this but this looks correct to me.
By making i<= a variable you can just change the totalImages var or, if you want to get crazy with it, set it dynamically.
the variable thumb = _root: im assuming mc thumb is on the root timeline. This may need to be adjusted.
Code:
var totalImages = 60;
for (var i = 0; i<=totalImages; i++) {
var thumb = _root["thumb"+i];
thumb.onRelease = function() {
unloadMovie(_root.pic);
_root.pic.loadMovie("images/"+i+".jpg");
_root.black._visible = true;
new Tween(_root.black, "_alpha", Regular.easeInOut, 0, 70, 1, true);
}
}
Bookmarks