I have written the following code, and the function called by mcListener.onLoadComplete is returning the current value in the array as “undefined.” I want the current image that has finished loading to fade in, but “i” seems to have no meaning within the function. If i replace the * with a number, it works fine. I think this is a scope issue but I can’t figure it out. Any help is much appreciated.
var thumbArray:Array = new Array;
var mcListener:Object = new Object;
var photoHolderLoader:MovieClipLoader = new MovieClipLoader;
photoHolderLoader.addListener(mcListener);
function creMenu(){
for (i=0; i<total; i++) {
var smallIm:MovieClip = smallPic.attachMovie("thumb","thumbNail"+i,i);
thumbArray* = smallIm;
thumbArray*._x = xPos*;
thumbArray*._y = 0;
thumbArray*._alpha = 0;
photoHolderLoader.loadClip(image*, thumbArray*.inner_mc);
mcListener.onLoadProgress = function(){
trace("LOADING");
};
mcListener.onLoadComplete = function(){
trace(thumbArray*);
};
smallIm.picVal = i;
//THUMBS ROLLOVER/RELEASE
thumbArray*.onRollOver = function(){
this.alphaTo(50,1,"easeOutExpo");
};
thumbArray*.onRollOut = function(){
this.alphaTo(100,1,"easeOutExpo");
};
thumbArray*.onRelease = function(){
largePic.workPicMask.scaleTo(100,.5,"easeOutExpo");
smallPic.alphaTo(0,.5,"easeOutExpo");
p = this.picVal;
largePic.picture.loadMovie(large[p], 1);
largePic.desc_txt.text = caption[p];
picture_num();
};
};
}