thumbnail->large img reference in loop
Hi,
I got this code displaying thumbnails, made with a help of Ned Murphy a while ago. I need to display full image after releasing a thumbnail. I don't know how to create references to function displaying a proper full image, tracing 'i' returns the final 'i' value, that is '5'. And I need to load full image with the same number as thumbnail's instance name. Any ideas?
var loader = new MovieClipLoader();
var preloader = new Object();
loader.addListener(preloader);
i = 1;
loadFunction();
function loadFunction() {
thumb_mc = this.createEmptyMovieClip(i, this.getNextHighestDepth());
loader.loadClip("thumb"+i+".jpg", thumb_mc);
preloader.onLoadInit = function() {
loadCompleteFunction();
};
}
function loadCompleteFunction() {
this.onRelease = function () {
callFullImage();
}
i++;
if (i<5) {
loadFunction();
}
}
function callFullImage() {
trace(i);
}
