Autoplay on load

Hi,
I’m having a problem.
I have an MP3 player built so that when a link is clicked on an html page the player pops up in a new window(so people can continue looking through the site while listening to music).
The problem is that the track is loaded in the new window by clicking a load button which loads the MP3 via XML. I want to do away with the button and have that first track load and play when the popup window opens.
Any ideas?Here’s the code!!!
Thanks in advance.
BRb

//sound
_soundbuftime = 3;
formatTime = function (millisecs) {
var secs = Math.floor(millisecs/1000);
var mins = Math.floor(secs/60);
secs %= 60;
if (secs<10) {
secs = “0”+secs;
}
if (mins<10) {
mins = “0”+mins;
}
return mins+":"+secs;
};
var snd = this.createEmptyMovieClip(“SoundController”, 1);
snd.init = function() {
snd._sound = new Sound(this);
this.isPlaying = false;
this.position = 0;
loadingbar_mc._xscale = 0;
progressbar_mc._xscale = 0;
};
snd.loadSound = function(url) {
this._sound.loadSound(url, true);
controls_mc.play_btn.onRelease();

this.updateTime();
};
snd.updateTime = function() {
var time = formatTime(snd.position);
if (time_txt.text != time) {
time_txt.text = time;
}
};
snd._sound.onSoundComplete = function() {
controls_mc.stop_btn.onRelease();
};
snd.onEnterFrame = function() {
if (this.isPlaying) {
this.position = this._sound.position;
}
this.loaded = this._sound.getBytesLoaded()/this._sound.getBytesTotal();
loadingbar_mc._xscale = scrubber_mc._xscalethis.loaded;
progressbar_mc._xscale = loadingbar_mc._xscale
this.position/this._sound.duration;
this.updateTime();
};
controls_mc.play_btn.onRelease = function() {
textScroll_mc.play();
this._visible = false;
if (!isPlaying) {
snd._sound.start(snd.position/1000);
snd.isPlaying = true;
}
};
controls_mc.pause_btn.onRelease = function() {
controls_mc.play_btn._visible = true;
if (!snd.isPlaying) {
return (0);
}
snd.position = snd._sound.position;
snd._sound.stop();
snd.isPlaying = false;

};
controls_mc.stop_btn.onRelease = function() {
controls_mc.play_btn._visible = true;
snd.position = 0;
snd._sound.stop();
snd.isPlaying = false;
};
scrubber_mc.onPress = function() {
if (!snd.loaded) {
return (0);
}
var pos = this._xmouse/100;
snd.position = Math.min(snd._sound.duration, possnd._sound.duration/snd.loaded);
if (snd.isPlaying) {
snd._sound.start(snd.position/1000);
}
};
SetSong = function (node) {
snd.node = node;
snd.loadSound(node.attributes.src);
title_txt.text = node.attributes.title;
time_txt.text = node.attributes.time;
};
snd.init();
var soundtrack:Sound = new Sound();
soundtrack.attachSound();
volumeSlider_mc.onMouseMove = function():Void {
var currentVolume:Number = this.position_mc._x/1;
soundtrack.setVolume(currentVolume);
};
controls_mc.play_btn.enabled = false;
//xml
XMLNode.prototype.moveBefore = function(beforeNode) {
if (this == beforeNode) {
return (0);
}
beforeNode.parentNode.insertBefore(this.cloneNode(true), beforeNode);
this.removeNode();
};
Clamp = function (min, n, max) {
if (n<min) {
return min;
}
if (n>max) {
return max;
}
return n;
};
var song_spacing = 40;
var over_node;
GenerateSongListing = function (playlist_xml, target_mc) {
target_mc = target_mc.createEmptyMovieClip(“list_mc”, 1);
var songs = playlist_xml.firstChild.childNodes;
for (var i = 0; i<songs.length; i++) {
var song_mc = target_mc.attachMovie(“song”, “song”+i, i);
song_mc._y = i
song_spacing;
song_mc.node = songs*;
song_mc.title_txt.text = songs*.attributes.title;
song_mc.time_txt.text = songs*.attributes.time;
song_mc.select_btn.onRelease = function() {
SetSong(this._parent.node);
controls_mc.play_btn.enabled = true;
this.enabled = false;
this._visible = false;
};
}
};
var playlist_xml = new XML();
playlist_xml.ignoreWhite = true;
playlist_xml.onLoad = function(success) {
if (success) {
GenerateSongListing(this, playlist_mc);
} else {
trace(“Error loading XML file”);
}
// no success? trace error (wont be seen on web)
};
playlist_xml.load(“mp3_playlist2.xml”);