Follow every step, otherwise it will not work:
1. Remove the actionscript from the mc, and put it your main timeline
2. Give the MC where the mp3 player is in an instancename mine is "player"
3. copy and paste this code:
I basically replaced every _root.parent with _level0.player.. (meaning: my MC called player is loaded into level0 of flash, so I address it with _level0.player)
Any questions you may have, drop a message
Cheers
Funkysoul
stop(); playlist = new XML(); playlist.ignoreWhite = true; playlist.onLoad = function(success) { if (success) { _global.songname = []; _global.songband = []; _global.songfile = []; for (var i = 0; i<playlist.firstChild.childNodes.length; i++) { _global.songname[i] = playlist.firstChild.childNodes[i].attributes.name; _global.songband[i] = playlist.firstChild.childNodes[i].attributes.band; _global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file; // trace(songname[i]+" "+songfile[i]+" "+songband[i]); } } _level0.player.createEmptyMovieClip("sound_mc", 1); _global.song_nr = random(songfile.length); _level0.player.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]); }; function timer(sound_obj) { time = sound_obj.position/1000; min = Math.floor(time/60); min = (min<10) ? "0"+min : min; sec = Math.floor(time%60); sec = (sec<10) ? "0"+sec : sec; _level0.player.timeDisplay_txt.text = min+":"+sec; } MovieClip.prototype.songStarter = function(file, name, band) { if (_level0.player.sound_obj) { _level0.player.sound_obj.stop(); delete _level0.player.sound_obj; } _level0.player.sound_obj = new Sound(this); _level0.player.sound_obj.loadSound(file, true); _level0.player.onEnterFrame = function() { if (_level0.player.sound_obj.position>0) { delete _level0.player.onEnterFrame; _level0.player.display_txt.text = name+" / "+band; timeInterval = setInterval(timer, 1000, _level0.player.sound_obj); } else { _level0.player.display_txt.text = "loading..."; } }; _level0.player.sound_obj.onSoundComplete = function() { clearInterval(timeInterval); _level0.player.timeDisplay_txt.text = "00:00"; (song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++; _level0.player.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]); }; _level0.player.volume1.dragger.onPress = function() { startDrag(this, true, 0, this._y, this._parent.volBG._width, this._y); _level0.player.onEnterFrame = function() { var p = (_level0.player.volume1.dragger._x/_level0.player.volume1.volBG._width)*100; trace(p) this.sound_obj.setVolume(p); }; }; _level0.player.volume1.dragger.onRelease = function() { delete this.onEnterFrame; stopDrag(); }; _level0.player.volume1.dragger.onReleaseOutside = function() { stopDrag(); }; }; _level0.player.btn_play.onRelease = function() { clearInterval(timeInterval); _level0.player.timeDisplay_txt.text = "00:00"; _level0.player.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]); }; _level0.player.btn_stop.onRelease = function() { clearInterval(timeInterval); _level0.player.timeDisplay_txt.text = "00:00"; _level0.player.sound_obj.stop(); }; _level0.player.btn_fw.onRelease = function() { clearInterval(timeInterval); _level0.player.timeDisplay_txt.text = "00:00"; (song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++; _level0.player.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]); }; _level0.player.btn_rev.onRelease = function() { clearInterval(timeInterval); _level0.player.timeDisplay_txt.text = "00:00"; (song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--; _level0.player.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]); }; playlist.load("playlist.xml");