Let's start...
Open your first animation file. Remember? With the bouncing ball.....
If you don't have it - start from scratch. Don't remember how? Shame on you!!!! Go to the "Basic Animation" page.
Add a layer.
This is where you will put the Play and Stop buttons.
Add another layer. This is where you'll put some ActionScript that will control the timeline.
The first step is to add a "STOP" action to the first frame. Why? Because we want the movie to play only when Play button is pressed.
Important: click on frame 1 of action layer.
Open Actions panel: Window > Actions
Or press F9
On the left panes click "Timeline Control"
(hey, you are going to control the timeline!!!)
Double-click on "stop"
Stop action will appear in the right panel.
Little "action" emblem will appear in frame 1 to show you that an action has been assigned to this frame.
Control > Test Movie. See? The ball is not bouncing.
Return to the file.
Time to add the first button.
Go to "buttons" layer.
Use Type tool and type PLAY.
Switch to Selection tool.
Select the PLAY word. You are going to convert it to Symbol.
F8
Type in the name of the symbol: play
For the symbol type choose: button
Click OK
Open Library (CTRL L)
See your first button? Good!
Now you need to make this button act as a button:
change color on rollover
and
assign the area that will respond to the mouse click
and
add ActionScript to assign this button a task of starting the movie.
Double-click on the library symbol to open its timeline
Remember that every symbol has its own timeline?
Well... so do buttons. Button's timeline is a little different. Instead of timeline frames it has button stages:
UP - the way button looks on the page
OVER - the way button looks when you roll your cursor over the button
DOWN - the way button looks when you click on it
HIT - The area that is assigned to this button as a hit area
Timeline is still a timeline. You still use the same shortcuts to add frames to it.
Push F6 two times. It will insert keyframes to Over and Down states (meaning that it will copy what's on your Up state to the rest of the states)
Control > Test movie.
See? The button is there. The cursor changes to a hand when rolled over. But it is not a fun button yet. And it does not do anything. So...
Return to your file.
Insert a blank keyframe on HIT state ( F 7 ).
Draw a rectangle the size of your text.
Color does not matter - it will not be seen on your page. You just assigned the area that will work as a button. That means if you roll over the area of this rectangle - the regular cursor will recognize it as a button and will change into a hand.
Note: Any shape will work as a designated area. If you leave the Hit state empty - the button will not work.
Now let's change the color of your text in "Over" state. That means : when you roll over your button - the text color will change.
Go to OVER state.
Click on the text to select it.
Go to Properties Inspector and change the font color.
Now your button is ready. All that's left is to assign an ActionScript to it to make it play the movie.
Return to the Main Timeline (click on Scene 1)
Click on the PLAY button to select it (it is important to select the right object when you assign ActionScript!!!!!)
Go to Actions panel (Window > Actions)
Click on Movie Clip Control
Double-click on "on"
You will see the options to choose from.
Click on "release"
Why? Because you want some action to happen to your movie after you click (and release!!!!) your mouse.