Hi everyone,
I have some code where an event handler listening to Event.ID3 fires twice for an MP3 file. From searching the web, I found a few others asking a similar question, but I haven’t seen any response.
Does anybody know what would cause the ID3 Event to fire twice for a single file? My only guess is that the MP3 file contains two versions of ID3 format.
The code looks like this:
var mySound:Sound;
function setup()
{
mySound = new Sound();
mySound.load(new URLRequest("07 - Rome.mp3"));
mySound.addEventListener(Event.COMPLETE, soundLoaded);
mySound.addEventListener(Event.ID3, id3Loaded);
}
setup();
function soundLoaded(event:Event):void
{
mySound.play();
}
function id3Loaded(event:Event):void
{
trace("Album: " + mySound.id3.album);
trace("Song: " + mySound.id3.songName);
trace("Artist: " + mySound.id3.artist);
trace("Track: " + mySound.id3.track);
trace("Year: " + mySound.id3.year);
trace("Comment: " + mySound.id3.TSIZ);
}
Thanks,
Kirupa :mmm_good: