Issue with preloader bar in thumbnail/gallery

Hey all,

Been searching the forums for anything that would help me out with this issue but havent had much luck. I’m hoping someone can shed some light.

I have a site that loads seperate .swf files for the different sections (Ie. Info, gallery, Etc.) everything is running fine except for this small issue I’m having with the preloader bar for the images/thumbnails itself. (the’re actually 2 preloaders in the photo .swf file, the one that is used when the whole movie is being loaded and the one for the photos/thumbnails.)

When I run the .swf file offline simulating download speed the preloader bar and percentage text updates as the tumbnails are loading an gets to 100% when it completes loading all the thumbnails and the first image. (as I expect it to work)
Now when I run the .swf online the preloader doesn’t update while loading the thumbsnails and the first image, but once it has complete downloading them and you go to another image via the next/prev button or by selecting a thumbnail then the preloader bar and text works fine.

I used the tutorial on adding thumbnails to gallery as the base for the photo section so the code should be familiar to some:

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
thumbnails* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
///////////////////////////////////// 
//listen = new Object();
//listen.onKeyDown = function() {
// if (Key.getCode() == Key.LEFT) {
// prevImage();
// } else if (Key.getCode() == Key.RIGHT) {
// nextImage();
// }
//};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
///////////////////////////////////// 
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
//this.preloader._visible = true;
if (loaded != filesize) {
this.preloader.preload_bar._xscale = 100*loaded/filesize;
this.preloader.preloader_text = Math.round(100*loaded/filesize)+"%";
this.preloader._visible = true;
} else {
this.preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
gallery_txt.desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
gallery_txt.desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
gallery_txt.desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
gallery_txt.pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code! 
this.createEmptyMovieClip("tscroller",1000);
scroll_speed = 12;
tscroller.onEnterFrame = function() {
//added x to _mc to fix bracketing issue
if ((this._xmouse>=thumbnail_mcx._x) && (this._xmouse<=thumbnail_mcx._x+thumbnail_mcx._width)) {
if ((mouse_mc.hitTest(hit_right)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._y -= scroll_speed;
} else if ((mouse_mc.hitTest(hit_left)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = hit_left._y+(target_mc._height+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
stop();
close_btn.onRelease = function(){
masktop.gotoAndPlay("exit");
maskbot.gotoAndPlay("exit");
maskthumbs.gotoAndPlay("exit");
}

If it will help I’ve put the site up at the following address:

testsite.crsairsoft.com

Any help with this would be appreciated.