Question about loading separate swf for each XML text

Hello,

I have created a dynamic textfield that displays the text attributes from an xml.
What I want to achieve is, to be able to load some SWF or Links from a different attribute of the xml when the specific menu item is clicked.
How can I add the CLICK event listener to the specific XML “text” attribute?
Because if I add the listener to the whole textfield, it loads the same swf for every menu item.

Here’s the xml:


<menu text="Menu1" swf="menu1.swf"/>
<menu text="Menu2" swf="menu2.swf"/>
<menu text="Menu3" url="http://www.google.com"/>
<menu text="Menu4" url="http://www.yahoo.com"/>

Another issue is that .swf’s requires a Loader but urls require :URLLoader. Would that be an issue since I have stored them all on the same xml list?