DUE DATE:__________
Putting Actions in keyframes causes the Action to execute when that frame
is reached, putting Actions on instance of buttons makes the Action execute
when the user clicks a button.
Using one of your Flash MX LAB 2 files, create 3
simple interactive buttons for your animation that will do the following:
• START the animation.
• STOP the animation.
• LINK to your Dreamweaver Web site.
• Add SOUND on at least on one of the buttons.
• LABEL each button with Text.
Follow these simple instructions to get you started.
- Reopen your flashlab2-tween.fla or flashlab2-morph.fla
file and rename it to flashlab3-button.fla.
- Insert a new layer for the buttons. You don't want to
place buttons in the layer with an animation; that will affect the tween
or morph. Name this layer Buttons.
- In the Buttons layer, draw a rectangle that will become
a simple button. Select it, and then convert to symbol
[F8]. Name it PlayButton and make sure
the behavior is set to Button.
- You'll need three buttons, so either copy and paste
the instance already onstage or drag another couple of instances of the
PlayButton symbol from the Library onto
the Stage in the Buttons layer.
-
Apply a Tint color style to each instance—one red (for Stop) and one green (for Play) —one
blue (for the Link). You can do all this from the
Properties panel.
-
Create 2 new layers and name these layers Actions
& Sounds. It’s best to have all the actions and/or
sounds created on separate layers.
- You need to attach an Action to each button individually.
Select the red button and access the Actions panel.
From the plus button select Actions >Movie Control
> Stop to add a Stop Action statement to the
Script Area on the Right. The default event is Release,
meaning the Action will execute when the user clicks then release the button.
- Now select the green Button instance and assign the
Play Action, found under Actions
> Movie Control > Play.
-
Now select the blue Button instance and assign a getURL
Action, found under Actions > Browser/Network > getURL.
- Select one or all three of the buttons to have a sound file attached,
use the Window > Common Libraries > Sound to find
a suitable sound file.
- Save and publish the flashlab3-button.swf
file to your Web site as your SIMPLE BUTTON example.