I think this could be simple!!

XML feed to my horizontal menu, i can measure the text width ok, but i can't figure out the algebra on how to layout my menu text side by side with a 20 pixel gap.

PHP Code:
function createMyMenu():void {


    
//This will be used to represent a menu item
    
var menuItem:MenuItem;
    
    
//Counter
    
var i:uint 0;
    var 
w:Number;
    var 
s:Number;
    


        
//Loop through the links found in the XML file
        
for each (var link:XML in xml.link) {

        
menuItem = new MenuItem();
        
menuItem.id i;

        
//If the text is longer than the textfield, autosize so that the text is 
        //treated as left-justified text
        
menuItem.menuLabel.autoSize TextFieldAutoSize.LEFT;

        
//Insert the menu text (link.@pgTitle reads the link's "pgTitle" attribute)
        
menuItem.menuLabel.text link.@pgTitle;

        
menuItem.0;
        
menuItem.menuLabel.width;
        
20;
        
        
//// this is wrong /////   
                
menuItem.i* (s);
                
//// i cant work it out ///// 

trace("width"w);


        
//Make the button look like a button (hand cursor)
        
menuItem.buttonMode true;
        
menuItem.mouseChildren false;
        
        
//Add event handlers (used for animating the buttons)
        
menuItem.addEventListener (MouseEvent.MOUSE_OVERmouseOverHandler);
        
menuItem.addEventListener (MouseEvent.MOUSE_OUTmouseOutHandler);
        
menuItem.addEventListener (MouseEvent.MOUSE_DOWNmousePressHandler);

        
menuMC.addChild(menuItem);
        

        
//Increment the menu button counter, so we know how many buttons there are
        
i++;
        
        
    }