tags:

views:

1965

answers:

3
+2  A: 

I have done like this b4 but with flash CS3 by using URLLoader and URLRequest so it's the same idea in flex try using this concept

public function sendSQLQuery(aspURL:String, variables:URLVariables, returnSQLXMLCallback:Function):void
     {
        var myXMLURL:URLRequest = new URLRequest(aspURL);    
        myXMLURL.data = variables;     
        myXMLURL.method = URLRequestMethod.POST;     
        var myLoader:URLLoader = new URLLoader();     
        //Define the event handlers to listen for success and failure
           myLoader.addEventListener ( IOErrorEvent.IO_ERROR, handleIOError );
           myLoader.addEventListener ( HTTPStatusEvent.HTTP_STATUS, handleHttpStatus );
           myLoader.addEventListener ( SecurityErrorEvent.SECURITY_ERROR, handleSecurityError );
           myLoader.dataFormat = URLLoaderDataFormat.TEXT;
        myLoader.addEventListener("complete", returnSQLXMLCallback);   
        myLoader.load(myXMLURL);
     }

and i recieve the returned page in XML format and then parse it

Ahmy
public function returnSQLXMLCallback(event:Event):void { }can you fill me in what to put in there?
sorry i already have it (var x:xml=new XML(event.target.data); thank you very much for you help!
so did my answer help u ?
Ahmy
+1 - good response - I liked it :D
Gabriel
Oh yes, your answer helped me! Thank you
A: 

Try using the .htmlText property of your TextArea control. See here, from the Flex docs:

http://www.adobe.com/livedocs/flex/3/langref/mx/controls/TextArea.html#htmlText

That should work, but keep in mind the HTML-rendering capabilities of Flex controls are still quite rudimentary; you won't get much in the way of styling or formatting (hence the number of questions on StackOverflow on this very topic), but the basics should work for ya.

Christian Nunciato
A: 

A shorthand way:

<mx:TextArea htmlText="{xmlText}" /> 
<mx:String id="xmlText" source="data.xml" />
Brandon Dement