A bit of xml help please

Hey guys, just wondering if I could avail of your expertise!

Im updating a flash gallery, which I didnt create myself, and having a few problems with images loading in via XML. Here is the function…

function thumbnails_fn(k) {

    tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
        target_mc.pictureValue = k;
        target_mc._x = (target_mc._width)*k;

        target_mc.onRelease = function() {
            thumbnail_mc.titles.productTitle.text = title[k];



    image_mcl = new MovieClipLoader();


Note: description[k] actually relates to the second line of the xml, the <width> tag, just havent got around to changing the wording yet, hence the trace to see if its being called at all, which it does onRelease

The problem im having is that when I have images that are different widths, the layout goes off, and some images start overlapping. If all the widths are the same, it works perfectly. Is there anything I could add to the above code to get it to set the width of each clip individually?

In my xml file I have added a slot for width

<title>Rita 1</title>

but cant seem to set that to the clips. I can trace the value onRelease of each image, but just cant get the widths set by this value

Any help appreciated.