1 Reply Latest reply on Jan 31, 2008 12:21 PM by WebXperience

    Button scripting help

    texjgc Level 1
      Hello.

      There is a simple solution to my question, Im sure.

      I have created 2 different states of my button that I want to make. Each state is a movie clip with graphics inside (a picture with text on top of it).

      I want to, in actionscript, tell flash that when a user mouses over my button to display "this" state, and when the user clicks to show "this", and on and on.

      I basically want to change states of the button based on what my user is doing with it (mousing over, clicking on it, etc.) with actionscript.

      Any help is appreciated. Thanks.
        • 1. Re: Button scripting help
          WebXperience Level 1
          1. If you have a MovieClip named "myButton" and inside your two states e.g. "over" and "click", add a new layer and label each of the keyframes "over" and "click" respectively.
          2. then in actionscript you can use the myButton.gotoAndStop("over"); in your mouseOver() method, and myButton.gotoAndStop("click"); in your onClick() method.
          NOTE: Make sure you have a stop action over each of these keyframes.