Action after last thumbnail has loaded

I’m trying to find a way of unhiding “scroller_mc” once the filnal thumbnail has loaded. I can refer to the mc’s, but the imaghes still haven’t loaded… any help will stop me going crazy.

The “onLoadComplete” function hides the “loading” mc, but it’s still before all the thumbnails have loaded.

Thanks

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
family = [];
ref = [];
gender = [];
water = [];
ecom = [];
rrp = [];
middle = [];
swfmc = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
thumbnails* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
family* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
ref* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
gender* = xmlNode.childNodes*.childNodes[4].firstChild.nodeValue;
dialcolour* = xmlNode.childNodes*.childNodes[5].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[6].firstChild.nodeValue;
water* = xmlNode.childNodes*.childNodes[7].firstChild.nodeValue;
ecom* = xmlNode.childNodes*.childNodes[8].firstChild.nodeValue;
rrp* = xmlNode.childNodes*.childNodes[9].firstChild.nodeValue;
middle* = xmlNode.childNodes*.childNodes[10].firstChild.nodeValue;
swfmc* = xmlNode.childNodes*.childNodes[11].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“xml/bossladies.xml”);
/////////////////////////////////////
p = 1;
function nextImage() {
if (p<(total-1)) {
if (loaded == filesize) {
_root.prod_info.alltext.ref_txt.text = ref[p];
_root.prod_info.alltext.family_txt.text = family[p];
_root.prod_info.alltext.gender_txt.text = gender[p];
_root.prod_info.alltext.dialcolour_txt.text = dialcolour[p];
_root.prod_info.alltext.description_txt.text = description[p];
_root.prod_info.alltext.water_txt.text = water[p];
_root.prod_info.alltext.ecom_txt.text = ecom[p];
_root.prod_info.alltext.rrp_txt.text = rrp[p]+" GBP";
_root.bigwatchMc.loadMovie(image[p]);
_root.middleMc.loadMovie(middle[p]);
picture_num();
}
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / “+total;
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip(“t”+k,thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc.pictureValue = k;
function slide5(easeType) {
ballTween = new mx.transitions.Tween(_root.scrollerMc, “_x”, easeType, 19, -231, 1, true);
}
target_mc.onRelease = function() {
p = this.pictureValue;
slide5(mx.transitions.easing.Regular.easeOut);
_root.scrollerMc.vorhang.play();
_root.prod_info.gotoAndPlay(10);
_root.createEmptyMovieClip(“middleMc”,level0);
_root.middleMc._x = 395;
_root.middleMc._y = 222;
_root.zoomIcon._visible = true;
_root.maskMc.enabled = true;
nextImage();
};
target_mc._x = target_mc._widthk;
mc_count = (target_mc._width
k)/target_mc._width;
if (mc_count>2) {
target_mc._y = target_mc._height;
target_mc._x = (target_mc._widthk)-375;
}
if (mc_count>5) {
target_mc._y = target_mc._height
2;
target_mc._x = (target_mc._widthk)-750;
}
if (mc_count>8) {
target_mc._y = target_mc._height
3;
target_mc._x = (target_mc._widthk)-1125;
}
if (mc_count>11) {
target_mc._y = target_mc._height
4;
target_mc._x = (target_mc._widthk)-1500;
}
if (mc_count>14) {
target_mc._y = target_mc._height
5;
target_mc._x = (target_mc._widthk)-1875;
}
if (mc_count>17) {
target_mc._y = target_mc._height
6;
target_mc._x = (target_mc._widthk)-2250;
}
if (mc_count>20) {
target_mc._y = target_mc._height
7;
target_mc._x = (target_mc._widthk)-2625;
}
if (mc_count>23) {
target_mc._y = target_mc._height
8;
target_mc._x = (target_mc._width*k)-3000;
}
};
tlistener.onLoadComplete = function() {
_root.scroller_loader._visible = false;
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k],“thumbnail_mc.t”+k);
function closeslide(easeType) {
closeSlide = new mx.transitions.Tween(_root.scrollerMc, “_x”, easeType, -269, 19, 1, true);
}
_root.prod_info.closeBtn.onPress = function() {
unloadMovie(”_root.middleMc");
};
_root.prod_info.closeBtn.onRelease = function() {
closeslide(mx.transitions.easing.Regular.easeOut);
_root.scrollerMc.vorhang.play();
_root.prod_info.gotoAndStop(1);
};
}