Game Development Reference
And you can also use buttons to turn the pages of the children's storybook. The art of creating and
programming buttons to control the display of information is such an important part of interactivity
that just the basic techniques that you'll be learning over the next few pages will alone be enough to
fuel the design of Flash-based websites, interactive information kiosks, and point-and-click adventure
games. With nothing more than a button and a bit of imagination, a rich interactive experience is only
a click away.
The first step is to actually make the buttons. Buttons are just another type of symbol, and you can
create them as easily as you created your storybook pages. The only difference is that buttons have
their own timeline with some special keyframes that allow you to specify how the button will look
when it's in its various states, such as being pressed or when the mouse is hovering over it.
Creating a button symbol
Let's create two buttons for the storybook. You want to give the reader the option of guiding the cat
either up the hill, or down into the pond. So, to keep things simple, let's call the two buttons HillButton
and PondButton . You'll start with the HillButton .
1. Select Insert ° New Symbol from the menu to open the Create New Symbol dialog box. Enter
HillButton as the button's name and select Button as the Type . Select the Export for ActionScript
option, as you did when making scene symbols. (If you don't see any of these options, click
the Advanced button to reveal them.) The Create New Symbol dialog box should look like
Figure 2-47 when you are done.
Figure 2-47. Use the Create New Symbol dialog box to create the