2 Replies Latest reply on Oct 31, 2010 6:14 AM by Arun Blue Brain

    make a button disappear

    uno91

      I am making a jeopardy game for a school project and I was wondering how I would make the buttons disappear after they have been clicked?

       

       

      Thanks!

        • 1. Re: make a button disappear
          Jason Szeto Level 3

          You can set the visible property to false or set alpha to 0.

           

          - Jason

          • 2. Re: make a button disappear
            Arun Blue Brain

            you can capture which button was clicked if u write event on button

            <mx:Button id="standardBtn" label="Standard Button" 
                                          click="
            buttonClickHandler(event)"/>
            in script
            protected function buttonClickHandler(event:Event):void
                        {
                            Alert.show(" Button id "+ event.target.id + " label" + event.target.label) ;
                        }

            now u can hide the particular button

            button.visible=false;//makes the button invicible, but the space will be used by button.

            button.includeInLayout=false;// removes the space used by button on stage.