var soundReq:URLRequest = new URLRequest("path1_a.mp3");
var sound:Sound = new Sound();
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
sound.addEventListener(Event.SOUND_COMPLETE, soundFinished);
function onComplete (event:Event):void {
sound.play();
}
function soundFinished (event:Event):void {
trace("my sound finished!");
}
|