EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 633

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...
Sound.onLoad 633
Example
The following example traces the ID3 properties of song.mp3 to the Output panel.
my_sound = new Sound();
my_sound.onID3 = function(){
for( var prop in my_sound.ID3 ){
trace( prop + " : "+ my_sound.ID3[prop] );
}
}
my_sound.loadSound("song.mp3", false);
See also
Sound.attachSound()
, Sound.ID3, Sound.loadSound()
Sound.onLoad
Availability
Flash Player 6.
Usage
my_sound.onLoad = function(success){
// your statements here
}
Parameters
success
A Boolean value of true if my_sound has been loaded successfully, false otherwise.
Returns
Nothing.
Description
Event handler; invoked automatically when a sound loads. You must create a function that
executes when the this handler is invoked. You can use either an anonymous function or a named
function (for an example of each, see
Sound.onSoundComplete). You should define this handler
before you call
my_sound.loadSound().
See also
Sound.loadSound()

Table of Contents

Related product manuals