# ASP mp3 player

**URL:** https://forum.kirupa.com/t/asp-mp3-player/188593
**Category:** Uncategorized
**Created:** [May 9, 2006, 9:26am UTC](https://forum.kirupa.com/t/asp-mp3-player/188593 "2006-05-09T09:26:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thedaveyb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thedaveyb](https://forum.kirupa.com/u/thedaveyb)
#### Post date: [May 9, 2006, 9:26am UTC](https://forum.kirupa.com/t/asp-mp3-player/188593/1 "2006-05-09T09:26:19Z")

</div>

Hi , i have several xml based mp3 players… for flash of course but ideally the datasource needs to be ASP i can write the get.asp page which will pass me the song name… but im struggling to understand where i can use this variable instead of the xml - the code below is from the best mp3 player code i can find - built by a fellow kirupian!! woo woo…

- 
* * *

```auto
playlist.onLoad = function(success) {
    if (success) {
        _global.songname = [];
        _global.songband = [];
        _global.songfile = [];
        for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
            _global.songname* = playlist.firstChild.childNodes*.attributes.name;
            _global.songfile* = playlist.firstChild.childNodes*.attributes.file;
            trace(songname*+" "+songfile*);
        }
    }
    _root.createEmptyMovieClip("sound_mc", 1);
    _root.sound_mc.sound_obj = new Sound();
    _global.song_nr = random(songfile.length);
    _root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
MovieClip.prototype.songStarter = function(file, name) {
    this.sound_obj.loadSound(file, true);
    this.onEnterFrame = function() {
        if (this.sound_obj.position>0) {
            delete this.onEnterFrame;
            this._parent.display_txt.text = name;
        } else {
            this._parent.display_txt.text = "loading...";
        }
    };
    this.sound_obj.onSoundComplete = function() {
        (song_nr == songfiles.length-1) ? _global.song_nr=0 : _global.song_nr++;
        _root.sound_mc.songStarter(songfiles[song_nr], songname[song_nr]);
    };
};

playlist.load("# asp page");

```

---- \*
