Newbie alert...now for my stupid question. I'm sure this is pretty 
simple but I am completely new to Flex: 

How do I dynamically display an array of external hyperlinks? I have 
the following xml code:

<sample>
<entry>
  <text>Click Me 1</text>
  <link>http://www.followthis1.com</link>
</entry>
<entry>
  <text>Click Me 2</text>
  <link>http://www.followthis3.com</link>
</entry>
<entry>
  <text>Click Me 3</text>
  <link>http://www.followthis3.com</link>
</entry>
</sample>

How do I make it so that the user will see the 3 items in the <text> 
field (dynamically...not hardcoded):
 1. Click Me 1
 2. Click Me 2
 3. Click Me 3
and then when each is clicked they will be directed to their 
respective links: http://www.followthis1com, http://www.followthis2com, 
http://www.followthis3com?

Here is the flex code I am (wrongly) using:
<mx:Script>
        <![CDATA[
                        import mx.events.ListEvent;                     
                        import mx.collections.ArrayCollection;
                        import mx.rpc.events.FaultEvent;
                        import mx.controls.Alert;
                        import mx.rpc.events.ResultEvent; 
[Bindable] private var thisList:ArrayCollection;
private function changeHandler(event:ListEvent):void{
                        }
                        private function init():void{
                                goodsample.send(); 
                                                        }
private function httpResultHandler(event:ResultEvent):void{
thisList = event.result.sample.entry;
                                                }
                        
        ]]>
</mx:Script>

<mx:HTTPService id="goodsample" 
url="http://localhost/sampleentries.php"; 
result="httpResultHandler(event)"/>     


<mx:LinkBar labelField="text"
        itemClick="navigateToURL(new URLRequest(       
String(event.label).toLowerCase()), '_blank');">
        <mx:dataProvider>
            {thisList}
        </mx:dataProvider>
    </mx:LinkBar>

Many thanks!

Reply via email to