XML loading Problem

Hi, I’m sure that is issue is fairly simple.

I am trying to load xml data into a dynamic text field. I am able to load, and trace the data but cannot display it into a dynamic field. Here is what i have:

var xmlLoader:URLLoader = new URLLoader()
    xmlLoader.load(new URLRequest("directory.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, showXML);
        
        function showXML(event:Event):void {
        XML.ignoreWhitespace = true;
var xmldata:XML = new XML(event.target.data);
    trace(xmldata.rcc.length());
    var i:Number;
        for (i=0; i < xmldata.rcc.length(); i++) {
        trace("Name: "+ xmldata.rcc*.name.text());
        trace("Room Number: "+ xmldata.rcc*.loc.text());
        trace("Extension: "+xmldata.rcc*.ext.text());
        trace("Email: "+xmldata.rcc*.email.text());
        
        }
    }
    

What I am trying to achieve, is to produce what I’ve traced into the dynamic field.

Also if there is a way to do that when a button has been clicked. I tried making the function showXML a mouse event, but it didn’t work.

Any help is appreciated!

Kevin.