Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Sound > id3 (Sound.id3 property) | |||
public id3 : Object [read-only]
Provides access to the metadata that is part of an MP3 file.
MP3 sound files can contain ID3 tags, which provide metadata about the file. If an MP3 sound that you load using Sound.attachSound() or Sound.loadSound() contains ID3 tags, you can query these properties. Only ID3 tags that use the UTF-8 character set are supported.
Flash Player 6 (6.0.40.0) and later use the Sound.id3 property to support ID3 1.0 and ID3 1.1 tags. Flash Player 7 adds support for ID3 2.0 tags, specifically 2.3 and 2.4. The following table lists the standard ID3 2.0 tags and the type of content the tags represent; you query them in the format my_sound.id3.COMM, my_sound.id3.TIME, and so on. MP3 files can contain tags other than those in this table; Sound.id3 provides access to those tags as well.
|
Property |
Description |
|---|---|
|
TFLT |
File type |
|
TIME |
Time |
|
TIT1 |
Content group description |
|
TIT2 |
Title/song name/content description |
|
TIT3 |
Subtitle/description refinement |
|
TKEY |
Initial key |
|
TLAN |
Languages |
|
TLEN |
Length |
|
TMED |
Media type |
|
TOAL |
Original album/movie/show title |
|
TOFN |
Original filename |
|
TOLY |
Original lyricists/text writers |
|
TOPE |
Original artists/performers |
|
TORY |
Original release year |
|
TOWN |
File owner/licensee |
|
TPE1 |
Lead performers/soloists |
|
TPE2 |
Band/orchestra/accompaniment |
|
TPE3 |
Conductor/performer refinement |
|
TPE4 |
Interpreted, remixed, or otherwise modified by |
|
TPOS |
Part of a set |
|
TPUB |
Publisher |
|
TRCK |
Track number/position in set |
|
TRDA |
Recording dates |
|
TRSN |
Internet radio station name |
|
TRSO |
Internet radio station owner |
|
TSIZ |
Size |
|
TSRC |
ISRC (international standard recording code) |
|
TSSE |
Software/hardware and settings used for encoding |
|
TYER |
Year |
|
WXXX |
URL link frame |
Flash Player 6 supported several ID3 1.0 tags. If these tags are in not in the MP3 file, but corresponding ID3 2.0 tags are, the ID3 2.0 tags are copied into the ID3 1.0 properties, as shown in the following table. This process provides backward compatibility with scripts that you may have written already that read ID3 1.0 properties.
|
ID3 2.0 tag |
Corresponding ID3 1.0 property |
|---|---|
|
COMM |
Sound.id3.comment |
|
TALB |
Sound.id3.album |
|
TCON |
Sound.id3.genre |
|
TIT2 |
Sound.id3.songname |
|
TPE1 |
Sound.id3.artist |
|
TRCK |
Sound.id3.track |
|
TYER |
Sound.id3.year |
Availability: ActionScript 1.0; Flash Player 6 - Behavior updated in Flash Player 7.
The following example traces the ID3 properties of song.mp3 to the Output panel:
var my_sound: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);
attachSound (Sound.attachSound method), loadSound (Sound.loadSound method)
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00002134.html