1 Reply Latest reply on Apr 22, 2012 11:54 AM by Ned Murphy

    Changing frames on a button


      Hello, I was going to make a level select frame in my game, and to unlock the different level, you need to complete the previous level. I've done this, but I also want an effect on my button. So if level1 completed=true, it goes red, but if it's false, it goes gray. For a movieclip, I would have used

      onClipEvent (enterFrame) {

                if (level1 == true)





      But that's only for movieclips, so do I have to make a pressable movieclip, or is there another way?

        • 1. Re: Changing frames on a button
          Ned Murphy Adobe Community Professional & MVP

          If you want a button that will stay in different states you need to use a movieclip as a button.


          Just a tidbit else...


          if(level1 == true)


          can be reduced to 




          conditinals work based on evaluating whether what is in the parentheses is true or false, so for Boolean values you don't need to use   == true/false