id3 tags

Hi!

I’ve read some AS samples about reading id3 tags from mp3’s.
In ther bottom is the code and I would like to ask how to display id3 tag in dynamic text box. (i’ve tried everything!!!)

//create an onEnterFrame event with
//listener capabilities
ASBroadcaster.initialize(Movieclip);
_root.createEmptyMovieClip("__enterFrame",-9799);
__enterFrame.onEnterFrame=function(){
Movieclip.broadcastMessage(“onEnterFrame”);
}
mysound=new Sound(this);
mysound.loadSound(“an_mp3.mp3”);
mysound.onLoad=function(){
Movieclip.addListener(this);
//redefine the onLoad event handler
this.onLoad=function(){
//iterate over all the id3 tags
//and trace their names and values
for(var i in this.id3){
trace(i+":"+this.id3*);
}
}
//when the onEnterFrame broadcast
//is recieved, call the newly defined
//onLoad evet handler and then
//stop listening to the broadcast
this.onEnterFrame=function(){
this.onLoad();
Movieclip.removeListener(this);
delete this.onEnterFrame;
}
}

I made dynamic text box named display and then used function:

display.text = id3; <<---- nothing happened
display.text = this; <<---- nothing happened
etc.

Thanx!

I’m not familiar at all with this id3 thing, but instead of looping in this.id3, did you try to loop in this to see if the element id3 appears?

pom :asian:

What do you mean?
Give me an example please…

Thnx

Sorry about that. I was refering to the following lines

for(var i in this.id3){
   trace(i+":"+this.id3*);
}

Does it return anything? If not, you might want to do the same loop with this instead of this.id3.

pom
:asian: