You could try to catch the error in the id3Handler , in case the id3 tags are not defined
function id3Handler(evt:Event):void {
try{
songInfo.text = /*song.id3.artist + ": " +*/ song.id3.songName;
}catch(e:Error)
{
trace(e );
//or...
songInfo.text = "No name"
}
}
although , you may well have a security issue , id3 info would be returned in such case. do you use a crossdomain policy file?
Extract from the Sound class docs:
Certain operations dealing with sound are restricted.
The data in a loaded sound cannot be accessed by a file in a different domain
unless you implement a cross-domain policy file.
Sound-related APIs that fall under this restriction are
Sound.id3 ,
SoundMixer.computeSpectrum(),
SoundMixer.bufferTime,
and the SoundTransform class.
Edit:
Here's a very permissive policy file, copy it , save it to a file and name the file
crossdomain.xml
then upload it to the root folder of your site, for instance for example.com
http://example.com/crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy> <site-control permitted-cross-domain-policies="all"/>
<allow- access-from domain="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>
If this works, read this article
http://kb2.adobe.com/cps/142/tn_14213.html
and see how you can secure your site with the crossdomain policy file