Buttons and Movie Clips can both be used to create interaction within a Flash Movie. Both have their positives and their negatives.
Many people like to use a button because it can display itself in different states (normal, over, and down), without any coding at all.
Creating a Button
To create a button, insert a symbol like you normally would.
Name your button, and make sure you select button, from the Symbol Type drop down.
This will open up the button so you can edit it.
Editing a Button
If you want to edit an existing button, you will need to double click on it from either the Library, or the Stage.
You will see your timeline where you normally do. However, the timeline will appear slightly different. Instead of a series of frames which can display, you will see four (4) frames, each with a label above.
As with a normal timeline, you can create multiple layers so that you can create text on top of a shape, or more complicated. You can put anything you want inside of that time line, although another button would not be recommended. This allows you to put a graphic, or a symbol like a movie clip. By adding a movie clip you can have some animation going on during one of the states for your button, if you want.
These three of four frames define a different state for the button: Up, Over, and Down. These will be displayed to the end user. However, a fourth state, the Hit state is also defined, and has a special purpose.
The up state is what a user normally sees when the mouse is not near the button. When you are editing a movie, this is what you will also see. In some places, you may see someone refer to this as the Normal state.
This is when the user’s mouse has entered into the “hit” area. (The hit area will be discussed in a moment.) This allows the user to see that they have a roll over effect, and it has been triggered.
If the Over State is not defined, then the normal state will be displayed.
The down state is when a person clicks on a button. While the mouse button is pressed down, the down state is displayed.
If there is not Down state key frame, the Over state is displayed.
The hit state is not something that is displayed. It is not seen, either in editing the state, nor during the playback. Rather, it defines where the mouse over effect and the click area are.
Like with previous states, if it is not defined, then the previous state that is defined is used. This also means that the click area can be completely different from the area that is displayed.
In previous versions of Flash, this was important for text used as a button. It used to be only where the letters were, would it act as a hit area. This meant a mouse could be inside of a cut out of a letter (like the middle of an “O” or “A”, and not register for the button. For the last few versions however, the sounding area is properly covered. However, you may want to expand the area a bit, so a hit area can be used.