By Guy Watson//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[i]);
    }
  }
   //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;
   }
}
| About the Author: Guy Watson (or FlashGuru as he is also known) has been an active, well recognized figure in the Flash community for over four years, supporting the community with tutorials, source files, moderating the Flashkit forums, and running his own Flash resource Web site, FlashGuru's MX 101. Guy was one of two developers who created the ever popular, award winning zoom interface for Relevare and now runs his own company, FlashGuru LTD, which builds Flash Games & Applications for clients such as Comic Relief, Egg and Channel 4. |
|
Software Download, Desktop... Communities Networking, Social... Forums Search, Learn... Animation Animate, Frames... |
Resources Programs, Podcasts... Tools Add-ons, Extras... Tutorials Design, ActionScript... News Technology, Business... |