Flash CS5 Button States - dummies

By Jennifer Smith, Christopher Smith, Fred Gerantabee

Take a look inside your Flash CS5 button by double-clicking it on the stage or in the Library panel; its unique timeline contains four specially marked frames: Up, Over, Down, and Hit. Each frame represents a button state, or the appearance of a button, as it interacts with a mouse in different ways.

Using states, your button can change appearance as it’s clicked, pressed, or released. You can even add layers inside your button to stack artwork for more creative flexibility. This list describes the states and what they represent:

  • Up: The appearance of your button when it’s not pressed or rolled over. This state is the one you see most of the time as the button sits on the stage.

  • Over: The appearance of the button when the mouse pointer rolls over it. Adding unique content to this frame creates the rollover effect that many people know and love from using web buttons.

  • Down: The appearance of the button when it’s clicked and the mouse button is held down.

  • Hit: Contents aren’t visible, but this state sets the hot spot, or clickable area, of your button. If the Hit frame is empty, it uses the shape on the last available state by default. You can create a more specific clickable area if you want to give users more or less area to work with or you want to simplify usability for odd-shaped buttons.

    Use a filled shape in the Hit frame so that the user has no problem interacting with your button.

Although choosing Control→Test Movie to preview your work is the best way to preview buttons, you may want to see how certain elements of your movie behave in real time on the stage. To see buttons in action on the stage as you build your movie, you can choose Control→Enable Simple Buttons. You then see buttons as they would appear and respond to a user in Flash Player.

Buttons can’t be selected or modified on the stage with Enable Simple Buttons mode active; you must disable Enable Simple Buttons to apply actions or transformations or to edit the button in place.