Creating buttons, Basic steps for creating buttons – Adobe Flash Professional CC 2014 v.13.0 User Manual
Page 243
Creating buttons
Button symbol
Movie clip button
ActionScript button component
Up frame
Over frame
Down frame
Hit frame
Basic steps for creating buttons
Create a button with a button symbol
Enable, edit, and test button symbols
Troubleshooting buttons
Additional button resources
Basic steps for creating buttons
1. Decide what button type best suits your needs.
Most people choose button symbols for their flexibility. Button symbols contain a specialized internal timeline for button
states. You can easily create visually different Up, Down, and Over states. Button symbols also change their state automatically as they
react to user actions.
You can use a movie clip symbol to create sophisticated button effects. Movie clip symbols can contain almost any type
of content, including animation. However, movie clip symbols do not have built-in Up, Down, and Over states. You create those states
yourself, using ActionScript. A disadvantage is that movie clip files are larger than button files. Use these resources to learn how to create a
button with a movie clip symbol:
Use a button component if you require only a standard button or a toggle, and you don’t want to
customize it extensively. Both ActionScript 2.0 and 3.0 button components come with built-in code that enables state changes. So, you don’t
have to define the look and behavior of button states. Simply drag the component onto the Stage.
ActionScript 3.0 button components allow for some customization. You can bind the button to other components, and share and
display application data. They have built-in features, such as accessibility support. Button, RadioButton, and CheckBox components are
available. For details, see
in Using Adobe ActionScript 3.0 Components. For examples of how to use Button
.
ActionScript 2.0 button components are not customizable. The component enables state changes. For details, see
2. Define your button states.
The appearance of the button when the user is not interacting with it.
The appearance of the button as the user is about to select it.
The appearance of the button as the user selects it.
The area that is responsive to clicks by the user. Defining this Hit frame is optional. If your button is small, or if its graphic area is
not contiguous, defining this frame can be useful.
The contents of the Hit frame are not visible on the Stage during playback.
The graphic for the Hit frame is a solid area large enough to encompass all graphic elements of the Up, Down, and Over frames.
If you don’t specify a Hit frame, the image for the Up state is used.
236