tags:

views:

163

answers:

2
private function google(event:ResultEvent):void
         {
          Alert.show(event.result.loginsuccess.keyword[0]);
          subtitle.visible=true;
          Results.visible=true;
          Occur.visible=true;
          query.visible=true;
          subtitle.text = "Search results for " +  event.result.loginsuccess.keyword[0];
          Results.text = event.result.loginsuccess.name;
          Occur.text = event.result.loginsuccess.occur;
          query.text = "query executed in " + event.result.loginsuccess.queryTime[0] + " Seconds";
         }
<mx:Text id="Results" x="130.5" y="180" text="Text" width="461" visible="false" fontWeight="bold" fontSize="16"/>

I am getting a list of websites in this text field, but i need to make them clickable. How can i do it. I mean the list of websites is random, it may be three or four or many.

The Format i am getting from backend is PHP and getting the response here in Flex through XML.

+1  A: 

use HTML text and you'll need to generate it yourself from whatever results you get back from the php.

[Bindable]
private var link : String = '<p>some text here <a href="http://stackoverflow.com/questions/925492/creating-links-in-flex"&gt;stackoverflow&lt;/a&gt; blah blah blah</p><p>even more text here <a href="http://www.bbc.co.uk"&gt;bbc&lt;/a&gt; blah blah blah</p>';

then in the text field,

<mx:Text htmlText="{link}"
/>
kenneth