Adding Sound > Accessing ID3 properties in MP3 files with the Flash Player |
![]() ![]() ![]() |
Accessing ID3 properties in MP3 files with the Flash Player
The Macromedia Flash Player 6r40 and later supports MP3 files with ID3 v1.0 and v1.1 tags.
ID3 tag properties can be retrieved from a sound object when an MP3 sound containing an ID3v1 tag has been loaded using the attachSound()
or loadSound()
method. If a sound does not contain an ID3v1 tag, the ID3 properties will be undefined. Users must have the Macromedia Flash Player 6r40 or later in order for the ID3 properties to function.
Once the MP3 has completely loaded into the Sound object, you can access the following properties:
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
Note: The value of genre
is an integer, not a name. For a table listing genre names and their corresponding integer values, see the ID3 website. To use a genre name instead of an integer for the genre
property value, you must embed the genre table into the ActionScript in your movie.
For example, the following code attaches Some_Linked_Sound to the mySound object and traces the artist's name for Some_Linked_Sound:
mySound
= new Sound();mySound
.attachSound("Some_Linked_Sound");mySound
.start(); trace("mySound
.id3.artist");
If the attached MP3 file Some_Linked_Sound has an ID3 v1.0 or v1.1 tag for artist
, the value is traced to the Output window.
Note: The entire song must be loaded for the ID3 properties to be available.
![]() ![]() ![]() |