# How to assign mp3s to buttons loaded via xml

**URL:** https://forum.kirupa.com/t/how-to-assign-mp3s-to-buttons-loaded-via-xml/189315
**Category:** Uncategorized
**Created:** [June 1, 2006, 4:06pm UTC](https://forum.kirupa.com/t/how-to-assign-mp3s-to-buttons-loaded-via-xml/189315 "2006-06-01T16:06:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![toriyamasan](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@toriyamasan](https://forum.kirupa.com/u/toriyamasan)
#### Post date: [June 1, 2006, 4:06pm UTC](https://forum.kirupa.com/t/how-to-assign-mp3s-to-buttons-loaded-via-xml/189315/1 "2006-06-01T16:06:34Z")

</div>

I have this problem. I need to assign 5 different mp3 to five differents buttons.

Im loading the path to the mp3 via an xml file.

In the kirupa tutorials i found a mp3 player that (with a little bit of editing) does what i want. I only have an inconvinient. in this mp3 player the path to the mp3 is in an attribute and i need it to be in a node value.

this is the fla working as i want with the data in attributes. ( ![](http://forum.kirupa.com/uploads/kirupa/2482/9a2671aeaaee63a1.gif)[drill\_a.zip](http://www.kirupa.com/forum/attachment.php?attachmentid=36394&stc=1&d=1149177872) &nbsp;)

And this is as far i could get loading the data from a bigger XML and with the information in values. ( ![](http://forum.kirupa.com/uploads/kirupa/2482/9a2671aeaaee63a1.gif)[drill\_a\_test.zip](http://www.kirupa.com/forum/attachment.php?attachmentid=36395&stc=1&d=1149177872) &nbsp;)

The issue is in the loop to assign the sounds to the buttons. it perfoms the loop but assing the last sound to every button and only the last sound.

i really apreciate your help.
