1 Reply Latest reply on Feb 5, 2009 6:42 AM by robdillon


    samuels2921 Level 1
      I am trying to remove a movieclip from the stage when the frame in which the movieclip is created is Exited.

      I want to say something like:

      onExitFrame = function(){
      myClip.removeMovieClip(); or

      But I understand their is no such method as onExitFrame. Everytime I click a button, my movieclip is there on top,in the way, no matter what frame. I can't just put the actionscript on the next frame because I have a lot of buttons that loads lots of other frames on that particular frame. I would have to add actionscript to all of my of buttons and functions, when onExit seems convinent. Please Help.
        • 1. Re: onExitFrame
          robdillon Most Valuable Participant
          If you are creating this clip in a particular frame then you can store that frame number in a variable. Then you can use an enterFrame loop to test for the _currentframe number. If its not the same as the value in the variable, remove the clip and the enterframe function.