XML Photo Gallery with Thumbs and Dynamic Resize issue

I’m looking for some advice on a incorporating thumbs to my photo gallery, and am having some problems making them work. My photos need to be resized dynamically as they are different sizes and this is working beautifully but I can’t for all that’s holy get the thumbs to work as they do so well in the “adding thumbnails” tutorial. Would love any assistance.

Thanks so much…

here’s the code…maybe this may help piece together the problem.

FLASH ::

title_txt.htmlText = “<font color=”#000000">Title: </font><font color="#FFFFFF">Splash Screen</font>";
/* Debug Variables */
//debug = 1; //Comment this “debug” line to stop the movie from ‘tracing’ or ‘outputting’
holderMC._alpha = 0;
var picArray = new Array();
var tempArray = new Array();
var thumbNailArray = new Array();
var SPACING = 10;
var DEPTH = 0;
var xmlFILE = “gallery.xml”;

function printer(str)
{
// If debug flag is set, output different operation in the movie
debug ? trace(str) : null;
}

MovieClip.prototype.loadPic = function(pic)
{
picnum_txt.text = (pic+1) + “/” + NUMOFPICS; // Add one to the ‘pic’ var since an array starts at 0
printer(“STATUS: Loading Picture " + pic);
holderMC._alpha = 0;
cur = pic;
if (pathToPICS.length > 1)
{
this.loadMovie(pathToPICS+picArray[pic]);
}
else
{
this.loadMovie(picArray[pic]);
}
this._parent.onEnterFrame = function()
{
var t = holderMC.getBytesTotal(), l = holderMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && holderMC._width>0)
{
var w = holderMC._width+SPACING, h = holderMC._height+SPACING;
border.resizePic(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
MovieClip.prototype.resizePic = function(w, h, pic)
{
var speed = 3;
holderMC._alpha = 0;
this.onEnterFrame = function()
{
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
title_txt.htmlText = “<font color=”#000000”><b>Currently Viewing:</b></font> " + “<font color=”#FFFFFF">" + tempArray[pic] + “</font>”;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1)
{
this._width = w;
this._height = h;
holderMC._x = this._x-this._width/2+SPACING/2;
holderMC._y = this._y-this._height/2+SPACING/2;
holderMC._alpha += 5;
if (holderMC._alpha>90)
{
holderMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};

var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success)
{
if (success)
{
printer(“RESULT: XML File Loaded!”);
var gallery = this.firstChild;
pathToPICS = gallery.attributes.picturePath;
NUMOFPICS = gallery.childNodes.length;
printer(“Number of Pics: '” + NUMOFPICS + “’”);
printer(“Path to Pics: '” + pathToPICS + “’”);
for (var i = 0; i<NUMOFPICS; i++)
{
tempArray.push(gallery.childNodes*.attributes.title);
picArray.push(gallery.childNodes*.attributes.source);
thumbNailArray.push(gallery.childNodes*.attributes.thumbNail);
thumbnails_fn(i);
}
//loading first picture
holderMC.loadPic(0);

    // Button Code
    prev.onRelease = function() 
        {
        if (cur == 0) 
            {
            /* Uncomment this line if you want the pictures to start over after it reaches the first image in the array */
            //holderMC.loadPic(picArray.length-1);
            }
        else
            {
            holderMC.loadPic(cur-1);
            }
        };
    next.onRelease = function()
        {
        if (cur == picArray.length-1) 
            {
            /* Uncomment this line if you want the pictures to start over after it reaches the last image in the array */
            //holderMC.loadPic(0);
            } 
        else
            {
            holderMC.loadPic(cur+1);
            }
        };
    } 
else 
    {
    printer("ERROR: XML File NOT Loaded '" + xmlFILE +" '");
    }
};

gallery_xml.load(xmlFILE); // Load the xml file
printer("XML File: " + xmlFILE);

function thumbNailScroller() {

// thumbnail code!
this.createEmptyMovieClip(“tscroller”, 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {

if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {

if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {

thumbnail_mc._x -= scroll_speed;

} else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {

thumbnail_mc._x += scroll_speed;

}

} else {

delete tscroller.onEnterFrame;

}

};

}

function thumbnails_fn(k) {

thumbnail_mc.createEmptyMovieClip(“t”+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {

target_mc._x = hit_left._x+(eval(“thumbnail_mc.t”+k)._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {

p = this.pictureValue-1;
nextImage();

};
target_mc.onRollOver = function() {

this._alpha = 50;
thumbNailScroller();

};
target_mc.onRollOut = function() {

this._alpha = 100;

};

};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnail[k], “thumbnail_mc.t”+k);

}

XML ::

<?xml version=“1.0” encoding=“UTF-8”?>
<gallery picturePath=“exhibitdesign/” >
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“001_shaw_center002.jpg” thumbnail=“th0.jpg”/>
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“002_shaw_center001.jpg”/>
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“003_shaw_center005.jpg”/>
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“004_shaw_center019.jpg”/>
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“005_shaw_center021.jpg”/>
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“006_shaw_center004.jpg”/>
<image title=“EXHIBIT DESIGN Shaw Center for the Arts Baton Rouge, LA” source=“007_shaw_center010.jpg”/>
</gallery>

<!–
Exif Info
–>

Thanks in advance.