Thumbnails and XML

I’m trying creating thumbnails using XML and being helped by this tutorial. I didn’t copy the code exactly as they did because my system is more complicated (having different categories, and those are thumbs for projects and not for 1 file each, and a file can be mp3, jpg etc. so I have a special MC that analiases it and then run it appropriately), so this is what I got, yet it doesn’t work and it seems it doesn’t manage to create thumbHolder.

import com.xfactorstudio.xml.xpath.*;
import mx.utils.Delegate; //helps to manage scope issues within callback functions

var thumbSpace:Number = 16;
var edge:Number = (Stage.width - 800 - 9 *thumbSpace)/2 ;
var prjName:Array;
var prjThumb:Array;
var prjInfo:Array;
var maxProjects:Number;

mainXML = new XML();
mainXML.ignoreWhite = true;
mainXML.load("Database.xml");
mainXML.onLoad = function() {
    prjName = XPath.selectNodes(mainXML, ("/Portfolio/" + category + "/Project/@Name"));
    prjThumb = XPath.selectNodes(mainXML, ("/Portfolio/" + category + "/Project/@Thumbnail"));
    prjInfo = XPath.selectNodes(mainXML, ("/Portfolio/" + category + "/Project/@Information"));
    maxProjects = prjName.length;
    for (i=0; i<maxProjects; i++) {
        this.thumbHolder = this.createEmptyMovieClip("thumbnail"+i, i);
        this.thumbHolder._x = edge + 80 * (i+1) + thumbSpace * i;
        this.thumbHolder._y = Stage.height - 80 - thumbSpace;
        trace (this.thumbHolder._x + "   " + this.thumbHolder._y);
        this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
        this.thumbLoader.loadMovie("projects/" + category + "/" + prjThumb*);
        this.thumbHolder.onRelease = function() {
            trace ("bap");
        };
    };
}

stop();

[FONT=Courier New] [/FONT]By the way, this code is in the Thumbnails’ movieclip and not in the root.

Someone please?