• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Controlling Sound > Detecting Sound Events

Detecting Sound Events

You can detect when a sound loads with the event onLoad or detect when a sound ends with onSoundComplete. Assign an anonymous function to the event to build the event handler. For example, consider the following script:

mySound_sound.onSoundComplete = function(){
   gotoAndStop(10);
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint