Buttons and Actions Exercise Flash: Interactive Web Animation by Ken Kimura
Open up your movie that contains your motion guide animation.
First create a new symbol (F8
or Insert menu/New Symbol...).
name it Btn_Play and set its behavior to be
a button.
In the first keyframe draw a blue box.
Add a keyframe to the rest of the button states.
Change the color of the box that youve drawn in the Over
and Down states.
Create a new layer with the text PLAY that stays
the same throughout all button states.
Open your library palette (f11). Select the Btn_Play symbol.
From the library palette dropdown menu (found at the top right corner
of the palette) select Duplicate. This will make
a copy of the button. name this copy Btn_Stop.
Edit the stop button so that its text reads STOP.
Go back to your main timeline (Scene 1)
Create a new layer and call it buttons.
Place both the Btn_Play symbol and the Btn_ Stop symbols
on this layer.
Make the buttons layer have frames throughout your timeline.
Test your movie to make sure your buttons change when you rollover
and click on them.
Create a new layer and call it actions.
We are going to add a Frame Action. On the first keyframe of
the actions layer, write an action to stop the movie from playing. To
do this, Select the keyframe, then open the Actions Panel (F9.) Open
the actions toolbox and double click on stop. This adds
the stop command to the keyframe.
Were now going to add actions to objects - specifically the
instances of the button symbols. Select the play button. In the actions
panel double click on play.
Select the stop button. In the actions panel double click on
Stop.