XML Slideshow/Portfolio array value not passing to movie clip

Hello,
I’ve adapted Kirupa’s xml portfolio and slideshow to something that works pretty well. But I haven’t been able to get a certain important function to work within a loop. The following script loads the xml file, defines several variables and creates an array. The array variables are assigned within a ‘for’ loop. Then the thumbs are loaded into their correct mc’s using the ‘i’ value. When I try this with the thumb links, the ‘i’ value gets lost and I get back an ‘undefined’ message. I can have it trace the image array and the others but passing the value of the thumb that you click doesn’t work. For instance, if you click thumb[5] (as passed through the loop), it should pass that [5] to the ‘bigimage_mc’.

Here’s the code. Any help would be greatly appreciated. I’d even be willing to exchange my adaptation (a portfolio with thumbs, swapping big image, and previous/next buttons).

//LOAD XML FILE AND CREATE ARRAYS FROM THE DATA///////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
thumb = [];
image = [];
title = [];
caption = [];
// VARIABLE COUNTING THE PICTURE NODES
total = xmlNode.childNodes.length;
// THE LAST INTEGERS MATCH THE CHILDNODES ORDER IN THE XML CORRESPONDING TO THE VARIABLE NAME
for (i=0; i<total; i++) {
thumb* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
image* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
title* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
caption* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
//LOAD THUMBS. THIS WORKS FINE.
thumbmenu_mc[“thumb_mc”+i].thumbimg_mc.loadMovie(thumb*);
//COULDN’T PASS THE ARRAY VALUE TO THE ‘bigimage’ TARGET WITH ‘onPress’ FUNCTION
thumbmenu_mc[“thumb_mc”+i].onPress = function() {
bigimage_mc.picture_mc._alpha = 0;
bigimage_mc.picture_mc.loadMovie(image*);
bigimage_mc.title_txt.text = title*;
bigimage_mc.desc_txt.text = caption*;
};
}
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“paintings.xml”);