Help: Stupid problem with MovieClip

Hi,

i’m trying to make an horizontal menu
i’ve got 7 buttons horizontally aligned. Between each button, a vertical line ( so, 6 lines ).

i want to have the same _x space between buttons…

so, this is my AS code :


// addition of all my buttons width
var totalWidth:Number = 0;
for (tw=1; tw<8; tw++) {
    totalWidth += this["btn"+tw]._width;
}
// calcul of my space between buttons (7:nb of buttons)
interv = (Stage.width-totalWidth)/7;
// 
for (i=1; i<8; i++) {
    mc._y = 100;
    var mc:MovieClip = this["btn"+i];
    mc.indice = i;
    mc._x = mc._width+interv;

//duplicate my line between buttons
    duplicateMovieClip(sep, "sep"+i, i);
    this["sep"+i]._x = 10*i;
}

the problem is all my buttons are at the same _x value… and the vertical line seems not to work …

help ! :slight_smile:
( in fact, i’m not sure that my code is the right AS code for doing this simple thing…)