Any help would be greatly appreciated.
I’m loading a sound like this:
var mySound:Sound = new Sound();
mySound.load(new URLRequest("audio/filename.mp3"));
mySoundChannel:SoundChannel = mySound.play();
Then I’m adding a listener and trying to call a function with the SOUND_COMPLETE event, like this:
mySoundChannel.addEventListener(Event.SOUND_COMPLETE,audioComplete);
function audioComplete(Event:Event){
trace("done!");
}
However, I keep getting this error: “1046:Type was not found or was not a compile-time constant:Event.”
Can anyone give me a hint as to what I’m doing wrong?
Thanks.
Thanks to those of you who responded. I ended up finding a better way to do this. If anyone runs into the same problem, here is what is working for me: