this code works in isolation:
PHP Code:
import fl.text.TLFTextField;
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.text.TextFieldAutoSize;
 
import flashx.textLayout.formats.TextLayoutFormat;
import flashx.textLayout.elements.TextFlow;
      
import flash.text.TextFormat;
import flash.text.AntiAliasType;
import flash.text.FontStyle;
import flash.text.Font;
import fl.text.TLFTextField;
import flash.text.engine.FontLookup;



var 
bodyText2:TLFTextField = new TLFTextField();
addChild(bodyText2);

bodyText2.border false;
bodyText2.wordWrap true;
bodyText2.width 480;
bodyText2.height 400;
bodyText2.columnGap 30;

//bodyText2.autoSize = TextFieldAutoSize.LEFT;
bodyText2.bodyText2.10;
bodyText2.columnCount 3;


     var 
oneColFormat:TextLayoutFormat= new TextLayoutFormat();
    
oneColFormat.textIndent 8;
        
oneColFormat.fontFamily "Helvetica Neue";
    
oneColFormat.fontSize 14;
    
oneColFormat.color=0x666666;
    
oneColFormat.lineHeight 20;
    
    var 
myTextFlow:TextFlow bodyText2.textFlow;
    
myTextFlow.hostFormat oneColFormat;
    
myTextFlow.flowComposer.updateAllControllers();
      

 
var 
ldr:URLLoader = new URLLoader();
ldr.dataFormat URLLoaderDataFormat.TEXT;
ldr.addEventListener(Event.COMPLETEldr_complete);
ldr.load(new URLRequest("markup.xml"));
 
function 
ldr_complete(evt:Event):void {
    
//myBox.tlfMarkup = ldr.data;
    //myBox.columnCount = 3;
    
bodyText2.text ldr.data;
    
//trace(ldr.data);

but when i try and transpose it into my main movie i can't seem to load the xml text into the text box. Something i need to understand is this code
ldr.dataFormat = URLLoaderDataFormat.TEXT; because i'm loading an xml node, the content in a different way. And not a single xml document in the top version.

i want to load text into bodyTxt2.text = xml.link[pict].@pgText;

PHP Code:
    
    xmlLoader
.load(new URLRequest("xml/CHBC_Web_TopLevel.xml"));
    
    
    
// add the text field    

    
addChild(bodyText2);

    
bodyText2.border false;
    
bodyText2.wordWrap true;
    
bodyText2.width 480;
    
bodyText2.height 400;
    
bodyText2.columnGap 30;

    
//bodyText2.autoSize = TextFieldAutoSize.LEFT;
    
bodyText2.bodyText2.100;
    
bodyText2.columnCount 3;


     var 
oneColFormat:TextLayoutFormat= new TextLayoutFormat();
    
oneColFormat.textIndent 8;
    
oneColFormat.fontFamily "Helvetica Neue";
    
oneColFormat.fontSize 14;
    
oneColFormat.color=0x666666;
    
oneColFormat.lineHeight 20;
    
    var 
myTextFlow:TextFlow bodyText2.textFlow;
    
myTextFlow.hostFormat oneColFormat;
    
myTextFlow.flowComposer.updateAllControllers();
    

}

initialize();



xmlLoader.addEventListener(Event.COMPLETE, function(evt:Event):void 
    
{
    
xml XML(evt.target.data);
    
changeIt(currentImage);

    }
    );

        
// content changing 

function changeIt(pict:Number):void {

    
bodyTxt2.text xml.link[pict].@pgText;
    
trace(bodyTxt2.text);
    
//bgMask.text = xml.link[pict].@pgText;
    
titleTxt.text xml.link[pict].@pgTitle
bodyTxt2.text = xml.link[pict].@pgText;
error Access of an undefined property bodyTxt2