Can someone please help me with this problem. What the code does is to create
an empty movieclip and, through a for loop, create new empty movieclips which
will contain an image each (image path loaded from an xml doc and image loaded
through the loadClip function). I want to be able to store the path to the
image in a variable (thumb). With this script, I get undefined instead of the
image path.

createEmptyMovieClip("thumbs_mc", 10);
thumbs_mc._x = 24;
thumbs_mc._y = 146;
var childarray = this.firstChild.childNodes;
for (i=0; i<childarray.length; i++) {
thumbs_mc.createEmptyMovieClip("thumbItem"+i, i+10);
with (thumbs_mc["thumbItem"+i]) {
_x = 0;
_y = i*80;
thumb = childarray.firstChild.nodeValue;
}
picURL = folder+"/"+childarray.firstChild.nodeValue;
myMCL.loadClip(picURL, _root.thumbs_mc["thumbItem"+i]);
//load the files in to their respective targets
thumbs_mc.onRelease = function() {
trace(this["thumbItem"+i].thumb);
};
}