generatePictureDisplay = function(eventNo:Number) {
// clear the stage
clearStage();
// create the holder MC called imageStack
timelineObj.createEmptyMovieClip("imageStack_mc", timelineObj.getNextHighestDepth());
// create the container MCs
for (var i = 0; i < picThumbArray.length; i++) {
imageStack_mc.createEmptyMovieClip("picContainer"+i, i);
thumb_mcl.loadClip(imageStack_mc["picContainer"+i],picThumbArray[i]); // picThumbArray[i] represents the relative URL of the image
// thumb_mcl is a moviecliploader created outside this function. none of the callbacks have been defined yet.
}
// determine the index of the middle thumbnail as a STARTING POINT FOR THE DISPLAY
var middleContainerIndex = Math.floor(picThumbArray.length / 2);
// position the MCs
imageStack_mc._x = 805;
imageStack_mc._y = 255 - (83*picThumbArray.length)/2;
imageStack_mc.picContainer0._y = 0;
for (var i = 1; i < picThumbArray.length; i++) {
imageStack_mc["picContainer"+i]._y = imageStack_mc["picContainer"+(i-1)]._y + 75 + 8;
}
}