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!