Adobe Flash

Create a button from grouped objects

You can create buttons from text and graphics, including bitmap images and grouped objects. In this lesson, you'll turn a logo and some text into one large button.

  1. In the Tools panel, click the Selection tool. On the Stage, select the grouped text and logo, and then select Modify > Convert to Symbol.

  2. In the Convert to Symbol dialog box, name the symbol BTNLogo, and select Button as the behavior.

  3. In the Registration grid, verify that the square in the upper-left corner is selected as the registration point, and click OK.

    The registration point is the point from which the symbol aligns and rotates.

Name a button instance

As a best practice, you should 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.

1.
Click in an empty space in the workspace to make sure you don't have any objects selected.

2.
Select Control > Enable Simple Buttons, and move the mouse pointer over different areas 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.

3.
Select Control > Enable Simple Buttons again to deselect the feature so that you can edit the button.

Next, you'll redefine the hit area so that the button area covers the entire grouped area.