# Playing a sound

**URL:** <https://forum.kirupa.com/t/playing-a-sound/116666>\
**Category:** Uncategorized\
**Created:** [July 20, 2004, 1:08pm UTC](https://forum.kirupa.com/t/playing-a-sound/116666 "2004-07-20T13:08:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cooleyo](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@cooleyo](https://forum.kirupa.com/u/cooleyo)\
**Post date:** [July 20, 2004, 1:08pm UTC](https://forum.kirupa.com/t/playing-a-sound/116666/1 "2004-07-20T13:08:40Z")

</div>

Hi,  
I’m having problems using dynamically-defined wav files using XML. What I do is that I put the sound path (“cow.wav”) as an attribute in my XML file, and then try to play it as mentionned in [http://www.kennybellew.com/tutorial/](http://www.kennybellew.com/tutorial/) under the section entitled “[font=Arial][size=2]How to Load an External MP3 Dynamically as a Sound Object[/size][/font]”.

I trace my sound variable, and it gives cow.wav as a result. The problem is, when we want to play sounds, we use _my\_sound_.loadSound(“_url_”, _isStreaming_). As you can see in here, url is between quotes. I think this is why I cannot play the sound, because it looks for cow.wav and not “cow.wav”…

So what do I do to “add quotes to the sound”? Is it done in AS? Is it done as every value of the XML file? Any help or link is appreciated!
