5 Replies Latest reply on Sep 17, 2010 4:46 PM by kglad

    How to use UnloadMovie on an onload Event

    Ex0skelet0r Level 1

      hi. i have this code that load on a keyframe

      loadListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void  {

      info.text = Math.round((bytesLoaded/bytesTotal)*100)+"%";

      };

      loadListener.onLoadInit = function(target_mc:MovieClip):Void  {

      info.text = "";

      };

      var mcLoader:MovieClipLoader = new MovieClipLoader();

      mcLoader.addListener(loadListener);

      mcLoader.loadClip(swf_path, swf_loader3);

       

      i want on every other keyframe to load this:

      swf_loader.unloadMovie();

       

      Because the swf_loader are mp3 player and if i change page wihout having press the stop button first the music is still playing.

      I have try to just add swf_loader.unloadMovie(); on every other keyframe but it doesnt work. i guess i have to find out where this swf_loader exist/is included right? how i can do that?