Help with XML slideshow - Fading last image

Hi I’m working on and xml loaded slideshow. I have a script that I got off of this site where the image fades out before the next one is loaded. The only problem is that the last image does not fade out, it just goes back to the first image which makes it inconsistant.

Anyone think they could help me with this?

Thanks in advance!

Here is the code I have so far:

delay = 4000;
function loadXML(loaded) {
	if (loaded) {
		xmlNode = this.firstChild;
		image = [];
		description = [];
		link = [];
		total = xmlNode.childNodes.length;
		for (i=0; i<total; i++) {
			image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
			description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
			link* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
		}
		firstImage();
	} else {
		content = "Please refresh your browser. XML was not loaded correctly";
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
p = 0;
function preload(clip) {
	picture.loadMovie(clip);
	var temp = this.createEmptyMovieClip("temp", 9987);
	temp.onEnterFrame = function() {
		filesize = picture.getBytesTotal();
		loaded = picture.getBytesLoaded();
		if (filesize>4 && filesize == loaded) {
			picture._alpha += 1;
			// used to be 10
			if (picture._alpha>100) {
				picture._alpha = 100;
				slideshow();
				delete this.onEnterFrame;
			}
		}
	};
}
function nextImage() {
	if (p<(total-1)) {
		p++;
		fadeOut(image[p]);
		desc_txt.text = description[p];
		desc_txt2.text = link[p];
	}
}
function firstImage() {
	picture._alpha = 0;
	fadeOut(image[0]);
	desc_txt.text = description[0];
	desc_txt2.text = link[0];
	
}
function slideshow() {
	myInterval = setInterval(pause_slideshow, delay);
	function pause_slideshow() {
		clearInterval(myInterval);
		if (p == (total-1)) {
			p = 0;
			firstImage();
		} else {
			nextImage();
		}
	}
}
function fadeOut(clip) {
	picture.onEnterFrame = function() {
		this._alpha -= 1;
		if (this._alpha<1) {
			preload(clip);
			delete this.onEnterFrame;
		}
	};
}