hzrdc2
asked on
Run function when sound is complete
I have an MP3 loading / playing in my flash file (code below).
My question, how can I tell flash to do something (run function) when the file is completed playing...?
My question, how can I tell flash to do something (run function) when the file is completed playing...?
var soundReq:URLRequest = new URLRequest("path1_a.mp3");
var sound:Sound = new Sound();
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
function onComplete (event:Event):void
{
sound.play();
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oh, I'm just glad I could help :)
-V
-V
ASKER