# Question about loading separate swf for each XML text

**URL:** <https://forum.kirupa.com/t/question-about-loading-separate-swf-for-each-xml-text/313415>\
**Category:** Uncategorized\
**Created:** [August 29, 2010, 3:19pm UTC](https://forum.kirupa.com/t/question-about-loading-separate-swf-for-each-xml-text/313415 "2010-08-29T15:19:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zenor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zenor/32/3634_2.png) [@Zenor](https://forum.kirupa.com/u/Zenor)\
**Post date:** [August 29, 2010, 3:19pm UTC](https://forum.kirupa.com/t/question-about-loading-separate-swf-for-each-xml-text/313415/1 "2010-08-29T15:19:35Z")

</div>

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:

```auto

<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?
