Sound.onID3

Availability

Flash Player 7.

Usage

my_sound.onID3 = function(){
  // your statements here
}

Parameters

None.

Returns

Nothing.

Description

Event handler; invoked each time new ID3 data is available for an MP3 file that you load using Sound.attachSound() or Sound.loadSound(). This handler provides access to ID3 data without polling. If both ID3 1.0 and ID3 2.0 tags are present in a file, this handler is called twice.

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()