4 Replies Latest reply on Aug 21, 2007 8:29 AM by coatsleeve1

    Making a button appear dim after use

    coatsleeve1
      Hi,

      I'm trying to work on a jeopardy game, and I pretty much suck on coding. Anyhow, I was able to disable the button so that when you go back to the board, the button no longer works, but I'd also like to dim that button. Is there a way to do this? Or is there a better solution out there?

      Thanks!
        • 1. Re: Making a button appear dim after use
          cory_
          Is your button a movie clip or button? Could try this code below, put it in your actions layer


          ButtonName_mc.onRelease = function() {
          this._alpha = 50;
          };
          • 2. Re: Making a button appear dim after use
            coatsleeve1 Level 1
            It's a button. Right now I am using this code to deactivate the button once it is clicked:

            on (press) {
            b = (b == null) ? true : false;
            if (b) {
            gotoAndPlay("qa1");
            }
            }

            In addition to being inactive, I want it dimmed so that the user doesn't try to click it again.
            Thanks for your help . . . your code wasn't quite the answer to my prayers, but i 'preciate the help.
            • 3. Re: Making a button appear dim after use
              cory_ Level 1
              ummm try this it seem to work for me

              on (press) {
              b._alpha = 50;
              b = (b == null) ? true : false;
              if (b) {
              gotoAndPlay("qa1");
              }
              }
              • 4. Re: Making a button appear dim after use
                coatsleeve1 Level 1
                Nope, almost, but not quite. I get the dimming effect, but only when I press on the button. My goal is to have that button dimmed when I return to that frame.

                This is what I'd like to have happen: I have the buttons on my game board, when I click on a button I go to a specific frame that houses the question, and on that frame I have a back button to go back to the game board, and at that point, when you're back to the game board, I want the button already pressed dim so that the user knows not to click on it again.

                Thanks for your help!