Names from extenal XML file to string variable

I’m new to AS 3 and I have this problem:
I want to make a dynamic menu with some buttons. Names(labels) of these buttons are in external XML file. Parameters of buttons are specified in main file .fla. I have also actionscript file .as (it works without errors), which makes these buttons with parameters specified in main file .fla .And I want to GET NAMES OF BUTTONS FROM EXTERNAL XML FILE TO STRING VARIABLE, but here is the problem. How could I do that? Please help.

Here are my scripts:

this is in main file .fla:

import flash.events.;
import flash.net.
;
import flash.text.*;

//declarations
var NumberofButtons:Number = 3;
var xposition:Number=25;
var textBut:String=new String;

//load XML file names.xml
var navData:XML;
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
loader.load(new URLRequest(“names.xml”));

function onComplete(evt:Event):void {
try {
navData = new XML(evt.target.data);
trace(navData);
loader.removeEventListener(Event.COMPLETE, onComplete);
loader.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
} catch (err:Error) {
trace("Could not parse loaded content as XML:
" + err.message);
}
}
function onIOError(evt:IOErrorEvent):void {
trace ("An error occured when attempting to load the XML " + err.message);
}

//parameters of buttons
for (var i:Number=0; i<NumberofButtons; i++) {
//text of button label - [COLOR=“Red”]HERE IS PROBLEM MAYBE[/COLOR]
[COLOR="#ff0000"]textBut= navData.buttons.button*.text();[/COLOR]
function positions():Number {
xposition=xposition+75;
return xposition;
}
// CreationBtn(hightofButton, widthofButton, colorofButton, colorofTextLabel,
// textLabelofButton, xpositionofButton)
var btn:Sprite = new CreationBtn(25,50,0xFFFF00,0x000000,textBut,positions());
addChild(btn);
}

here is XML file - names.xml
<buttons>
<button>Animations</button>
<button>Photo</button>
<button>Books</button>
</buttons>

actionscript file is CreationBtn.as and has no errors