# Whats wrong: XML SOUND

**URL:** <https://forum.kirupa.com/t/whats-wrong-xml-sound/242283>\
**Category:** Uncategorized\
**Created:** [October 24, 2007, 12:46pm UTC](https://forum.kirupa.com/t/whats-wrong-xml-sound/242283 "2007-10-24T12:46:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilleypants](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@lilleypants](https://forum.kirupa.com/u/lilleypants)\
**Post date:** [October 24, 2007, 12:46pm UTC](https://forum.kirupa.com/t/whats-wrong-xml-sound/242283/1 "2007-10-24T12:46:31Z")

</div>

I am trying to load in a sound from XML into a empty movieclip when a user selects a button… this is my code for loading the sound but I can’t get it to play.

```auto
 
function loadXML(loaded) {
 if (loaded) {
  
  _root.ContentSound = this.firstChild.childNodes[0].childNodes[3].firstChild.nodeValue;
// trace(this.firstChild.childNodes[0].childNodes[3].firstChild.nodeValue);
  loadSound_mc.loadSound(_root.ContentSound,1);
  _root.loadSound_mc.play()
  _root.soundplaying_mc._visible = true;
 
  function firstImage() {
   if (loaded == filesize) {
    picture._alpha = 0;
    picture_num();
   }
  }
 } else {
  trace("file not loaded!");
  
 }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("workingtest4.xml");

 

```

Any ideas as to where I am goign wrong? Thanks
