1 Reply Latest reply on Feb 21, 2011 7:05 AM by kglad

    How can I make my buttons be gone forever?

    TiMeterMedKreft

      Just starting out with Flash and have run into a problem. I have several scenes with buttons that can be pressed once and then they disappear using:

       

      myBtn1.onRelease = function(){ this._visible=false}

       

      But when I go back to the scene the buttons reappear. How can I make my buttons be gone forever?

        • 1. Re: How can I make my buttons be gone forever?
          kglad Adobe Community Professional & MVP

          if you have more than 1 button that should be made not visible at any given time, you'll need to use an array to store those button references.  otherwise, you can use:

           

          var alreadyRemoved:Boolean;

           

          if(alreadyRemoved){

          myBtn1._visible=false;

          }

           

          myBtn1.onRelease=function(){

          this._visible=false;

          alreadyRemoved=true;

          }

          1 person found this helpful