AS: Loading first picture in XML gallery

Hello,

The XML gallery I have has a pop-up window that appears after selecting a thumbnail. What I’m trying to accomplish is for the first picture in the gallery to load into the pop-up window, which is now always shown on the stage.

I was able to make it so that the pop-up is always visible, but one thing I couldn’t figure out is how to make it so that the first picture in the gallery loads into the pop-up box WITHOUT the user selecting the thumbnail first?? :crying:

I think it has to do with this code:

portfolio_xml.onLoad = function(success) {
		if (success) {
			var gallery = this.firstChild.childNodes[index];
			galleryInfo.text = this.firstChild.childNodes[index].attributes.title;
			var totalGalleries = this.firstChild.childNodes.length;
			GeneratePortfolio(gallery, totalGalleries);
			window.loadPic(this.image);
			//set the variable cur in mc window to the current picture
			window.cur = this.id;
			//call function in mc window for setting the next and prev buttons +info text (see there)
			window.setPrefPop(0);
		} else {
			trace("Error loading XML file");
		}
	};
	portfolio_xml.load("portfolio.xml");
}

Can you help? I thought that window.loadPic (this.image) would work, but it doesn’t? I’ll attach the gallery to this posting.