XML gallery variable img width

hi there folks,

i’m a complete noob when it comes to scripting.
i’m working on a XML gallery. it’s supposed to read the images from the xml and then add them to a holder_mc.

my only problem is that i cannot work out how i could manage to make the new clips appear next to the old one with a space of lik 50 px between them. i wanna keep it variable to some extend.

so, here’s the xml

<?xml version="1.0" encoding="utf-8"?>
<easeslide>
    <data>
        <image>images/01.jpg</image>
        <width>326</width>
    </data>
    <data>
        <image>images/02.jpg</image>
        <width>490</width>
    </data>
    <data>
        <image>images/03.jpg</image>
        <width>490</width>
    </data>
</easeslide>

then, in flash i’m having a little trouble. the code was working with a fixed image-width, so it said


loadContainers = function(){
        var mcload_w = content_mc.mcload0._width;
        var myAmount = total - 1;
        
        for(var i=1;i<=myAmount;i++){
        
        duplicateMovieClip(content_mc.mcload0,"mcload"+i,i);
        content_mc["mcload"+i]._width = imgwidth*;
        content_mc["mcload"+i]._x = (content_mc.mcload0._x +(mcload_w*(i)));
        content_mc["mcload"+i]._y = 0;
        }
}

now i figured, that if i want to keep it dynamic, i could create a var that tells the new instance of “i” its _x cordinate by summing up

[i-1]._x + imgwidth[i-1]

but i don’t know how to write it properly in flash. if i trace what i’ve been trying here it says NaN.

content_mc["mcload"+(i-1)]._x + imgwidth[i-1]

oh my, you guys must have a blast reading this nooby-****.
nevertheless, if someone could help me out i’d be more than grateful : ))

thanks in advance,
cheers,
gandarufu