Help! problems with scotty's "total" kirupa slideshow

I modified some of codes in “total” slideshow to adopt the slide and loop functions from other kirupa slideshow with slide and loop capabilities, but it’s frustrating that I couldn’t get the it to work. The preloader won’t jump to the gallery after all images are loaded and it just stuck to continue preloading and increasing the info.text data (e.g. “8 of 7 images loaded”, “9 of 7 images” and continue to climbing instead of jump into gallery after “7 of 7…”). What am I missing??:

[AS]
var id, current;
var k = 0, p = 0;
var slide = 1;

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}
id = setInterval(preloadPic, 100);
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“images.xml”);
var loadTot = 0;
// ///////////////////////////////////
function preloadPic() {
clearInterval(id);
var con = picture.duplicateMovieClip(“con”+k, 9984+k);
con.loadMovie(image[p]);
var temp = _root.createEmptyMovieClip(“temp”+k, 99+k);
k++;
temp.onEnterFrame = function() {
var total = con.getBytesTotal();
var loaded = con.getBytesLoaded();
percent = Math.round((loaded/total*100)/image.length);
preloader.preload_bar._xscale = loadTot+percent;
info.text = “Loading picture “+k+” of “+image.length+” total”;
if (loaded == total && total>4) {
con._visible = 0;
con.onEnterFrame = fadeIn;
loadTot += percent;
if (slide) {
id = setInterval(nextImage, 5000);
}
delete this.onEnterFrame;
}
};
}
function nextPic() {
if (k<image.length-1) {
k++;
preloadPic();
} else {
firstImage();
preloader._visible = 0;
info.text = “”;
}
}

function nextImage() {
p<total-1 ? p++ : p=0;
desc_txt.text = description[p];
picture_num();
preloadPic();
}
function prevImage() {
p>0 ? p-- : p=total-1;
desc_txt.text = description[p];
picture_num();
preloadPic();
}
// ///////////////////////////////////
MovieClip.prototype.fadeIn = function() {
if (this._alpha<100) {
current._alpha -= 10;
this._alpha += 10;
} else {
current._visible = 0;
current = this;
delete this.onEnterFrame;
}
};
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}

previous_btn.onRelease = function() {
slide = 0;
prevImage();
};
next_btn.onRelease = function() {
slide = 0;
nextImage();
};
play_btn.onRelease = function() {
slide = 1;
nextImage();
};
pause_btn.onRelease = function() {
slide = 0;
clearInterval(id);
};
preloadPic();
[/AS]

appreciate any help in advance!