Copy link to clipboard
Copied
Many years ago, using flash, i learned how to use sound to trigger events using actionscript.
But I can't now remember.
I can't seem to find any help on this subject.
Lots of help on triggering sound using actionscript, but i want to make animation sound reactive.
Any help,
Thanks.
Copy link to clipboard
Copied
in what way do you want to use sound to trigger an event?
for example, you might want the end (completion) of a sound to trigger an event. then you would use something like:
var soundCompleteE:Event=new Event("soundCompleteE");
var yoursoundchannel:SoundChannel = yoursound.play();
yoursoundchannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteF);
function soundCompleteF(e:Event):void {
dispatchEvent(soundCompleteE);
}