# Xml playlist -- halfway done

**URL:** https://forum.kirupa.com/t/xml-playlist-halfway-done/214009
**Category:** Uncategorized
**Created:** [January 24, 2007, 10:43pm UTC](https://forum.kirupa.com/t/xml-playlist-halfway-done/214009 "2007-01-24T22:43:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)
#### Post date: [January 24, 2007, 10:43pm UTC](https://forum.kirupa.com/t/xml-playlist-halfway-done/214009/1 "2007-01-24T22:43:38Z")

</div>

Hello. I have AS pulling in an xml playlist and I have the nodes pushed into arrays already. You can see my code so far:

```auto

var songs:Array = new Array;
var titles:Array = new Array;
var audioxml:XML = new XML;
audioxml.ignoreWhite = true;
audioxml.onLoad = function() {
  var s:Array = this.firstChild.childNodes;
  var totalTitles:Array = this.firstChild.childNodes;
     for (i=0;i<s.length;i++) {
    songs.push(s*.attributes.src);
  }
  for (j=0; j<totalTitles.length; j++) { 
      titles.push(totalTitles[j].firstChild.nodeValue);
  }
    startMP3()
    trace(titles[0]);
    trace(songs[0]);
}
audioxml.load("audiofeed.xml");

mp3 = new Sound();

function startMP3(){
    mp3.loadSound(songs[1], true);
}

```

I know my function startMP3 is wrong, I just needed something to load initially and thats where my question comes in. How do I make it actually play like a playlist? As in after one sound is done it goes to the next or if I hit the next button it goes to the next, although those functions should be similar. Someone said to use onSoundComplete and I looked at it but dont know how to incorporate it into what I have.

Any help please?  
-Ronnie
