Name a button instance
As a best practice, name instances of symbols on the Stage. ActionScript relies on the instance
name to identify the object.
•
With the button that you created still selected, open the Property inspector (Window >
Properties). In the Instance Name text box, type logo_btn.
View the hit area by enabling buttons
When the Enable Simple Buttons feature is active, you can view the less complex aspects of your
buttons, such as the hit area (the clickable area of a button) and the colors used for the button
states. More complex button design, such as animation, does not play.
Click in an empty space in the work area, to make sure you don't have any objects selected.
1.
Select Control > Enable Simple Buttons, and then move the mouse pointer over different areas
2.
of the button that you created.
The only areas of the button that are clickable (as indicated when the pointer changes to
a hand) are the text area and the logo. The white space around the text and logo are
not clickable.
Select Control > Enable Simple Buttons again to deselect the feature so that you can edit
3.
the button.
Next, you'll redefine the hit area so that the button area covers the entire grouped area.
Change the hit area of a button
You can specify a hit area that's a different size from the default hit area by adding a keyframe to
the Hit frame of the button symbol, and then drawing a shape that defines the hit area.
On the Stage, double-click the logo button that you created to view the button Timeline. The
1.
button Timeline contains the following states:
Up
Over
Down
Hit
Double-click the Layer 1 name in the Timeline and rename the layer Hit Area.
2.
Change the hit area of a button
71
Need help?
Do you have a question about the FLASH MX 2004-LEARNING FLASH and is the answer not in the manual?
Questions and answers