i have a dynamic gallery that loads thumbnails and big pictures with XML.
i need all the thumbnails to load before but not the big pictures so i made two for loops and only for the thumbnail loop i am using MovieClipLoader ,addListener and loadClip like this:
loderFun = function (currentCat) {
currentCatMain = currentCat;
for (i=0; i<this["path_thNmame"+currentCat].length; i++) {
this.thumbs.createEmptyMovieClip("holder_mc"+i, this.thumbs.getNextHighestDepth());
this.thumbs["loader"+i] = new MovieClipLoader();
this.thumbs["loader"+i].addListener(this);
this.thumbs["loader"+i].loadClip(this["path_thNmame"+currentCat]*, this.thumbs["holder_mc"+i]);
}
for (m=0; m<this["path_bpName"+currentCat].length; m++) {
this.createEmptyMovieClip("tempMc"+m, this.getNextHighestDepth());
_root["tempMc"+m].loadMovie(_root["path_bpName"+currentCat][m]);
_root["tempMc"+m]._alpha = 0;
}
function onLoadInit(i) {
loadedImages++;
m = i._name;
m = m.slice(9, 11);
holderHeight = this.thumbs["holder_mc"+m]._height;
this.thumbs["holder_mc"+m]._y = thumbsHeight;
thumbsHeight += holderHeight+4;
if (loadedImages == this["path_thNmame"+currentCatMain].length) {
play();
}
}
};
i am not sure if this is the right way to use the onLoadInit and i am afaraid it will make problems that i cant see now . can i have some feed back for this? i want to add a preloader aswell…also if i understand correct i can have only one onLoadInit ?