Downloading and then playing sound

Hi All,

I’m using this script do download a loop and after the dl it should start playing…doesn’t work though…
Anyone and idea?

thx,

m.
to d…

onClipEvent (load) {
mySound = new Sound();
mySound.loadSound(“goodloop.mp3”, false);
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = “downloading loop…”;
} else {
complete = 1;
_root.dl = “”;

}

}

to start

if (_root.mySlider.complete == 1) {
_root.mySlider.mySound.start(0, 99);
}

its gotta go in the same folder as the .swf

if you import your goodloop.mp3 into your library, and set its ‘linkage’ to something like “goodloop” (without quotes, later adding quotes in the AS) plus making sure the first and last checkboxes are checked, then when you go back to your timeline, just create a new layer called actions and in frame 1 put the following AS

:[AS]mysound = new sound ();
mysound.attachsound (“goodloop”);
mysound.start (0, 999);[/AS]

music does 999 loops and starts automatically if you use this last line… but if you want to trigger it off yourself, then action script 2 buttons “on” and “off”

On

[AS]on(release){
mysound.start (0,999);
}[/AS]

Off

[AS]on(release){
mysound.stop ();
}[/AS]

as I type this, i can hear echoes of Electrongeek saying :

"http://kennybellew.com "

cheers MP

thanks guys for the infos…

however, I do NOT want it in the library, because the file is pretty big. So the user is able to navigate earlier and later on (eventually) the sound will start… Thats why dl’g the mp3 makes more sense, instead of putting it in the lib.

thx,
m.