EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 634

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
634 Chapter 12: ActionScript Dictionary
Sound.onSoundComplete
Availability
Flash Player 6.
Usage
my_sound.onSoundComplete = function(){
// your statements here
}
Parameters
None.
Returns
Nothing.
Description
Event handler; invoked automatically when a sound finishes playing. You can use this handler to
trigger events in a SWF file when a sound finishes playing.
You must create a function that executes when this handler is invoked. You can use either an
anonymous function or a named function.
Example
Usage 1: The following example uses an anonymous function:
my_sound = new Sound();
my_sound.attachSound("mySoundID");
my_sound.onSoundComplete = function() {
trace("mySoundID completed");
}
my_sound.start();
Usage 2: The following example uses a named function:
function callback1() {
trace("mySoundID completed");
}
my_sound = new Sound();
my_sound.attachSound("mySoundID");
my_sound.onSoundComplete = callback1;
my_sound.start();
See also
Sound.onLoad

Table of Contents

Related product manuals