Grid for gallery

Hi:

Awhile back, stringy was nice enough to help me out with the grid for an xml gallery I was working on. His solution (found here http://www.kirupa.com/forum/showthread.php?t=199835&highlight=grid) worked when I used it before. Well now, I’m using the gallery again and am using nearly the same layout and it won’t work! The loader shows up fine but the thumbnails are not showing up at all. I’m feeling VERY frustrated. Would someone please look at this code and see if they see any errors or if they have a solution to my problem. Also, I would like to add something that forces the first image to appear when the gallery loads. How would I do that? Here’s my code:

myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
// portfolioTag = this.firstChild;
gridx = 25;
gridy = 25;
num = 0;
for (i=0; i<5; i++) {
for (j=0; j<3; j++) {
picHolder = this.firstChild.childNodes[i+(j*3)];
thumbHolder = thumbnails.createEmptyMovieClip(“thumbnail”+num, num);
thumbHolder._x = gridxi;
thumbHolder._y = gridy
j;
num++;
thumbLoader = thumbholder.createEmptyMovieClip(“thumbnail_image”, 0);
thumbLoader.loadMovie(picHolder.attributes.thmb);
thumbHolder.title = picHolder.attributes.title;
thumbHolder.main = picHolder.attributes.main;
thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}
}
};
myPhoto.load(“xmlphoto.xml”);

Thanks in advance,
Sarah