Adding Actions and a Button to Your Movie

Stopping the Action

If you published your movie now, the car would start moving as soon as the viewer entered the screen. You want the viewer to click on a button to make the car move. In this exercise you will add a behavior to stop any action before the viewer clicks a button. Later, you will add a button for the viewer to click to start the action. You will use behaviors to control the action. Generally you use ActionScript, a scripting language, to control the action in a Flash document. However, behaviors allow you to control some actions even if you do not know ActionScript.

Stop the Action

Add a new layer:

Add a stop behavior:

Bahaviors

Behaviors

Go To and Stop

Go To and Stop

Behaviors

Play the Movie

Adding a Button Buttons have four states: up, over, down, and hit.

The Four Button States

Up

The appearance of the button when the pointer is not over it

Over

The appearance of the button when you place the pointer over it

Down

The appearance of the button when you click it

Hit

Defines the area that will respond to a click of the mouse

You want to create a button that is navy in the up state, green in the over state, and brown in the down state.

Create a New Layer

Take the Start Button from the Library

Button Added to Movie

Edit the Symbol

Edit Symbols

The Over Frame

Over Frame

Insert Keyframe

Keyframe

The Down Frame

The Hit Frame

Edit Document

Add the Goto and Play Behavior:

Test the Movie

The Text Tool

You need to put a label on the Start Button and add a title to the movie. You will use the Text tool for this.

Add Text to the Button

Start Movie

Add a Title Choose the Text tool.

My First Movie

Test the Movie

Flash Movie Tutorial