Follow these instructions along with the notes on the pictures to add interactive buttons to a Flash movie and add a sound effect.
Your final animation will work like this one.
Open your motion guide movie. Click on your top layer and insert two new layers. Name one actions and the other one buttons. Click in frame 1 of the actions layer. |
|
|---|---|
Open the Actions panel (F9). Click on the Script Assist button. (these screenshots are of a version of Flash that does not have that feature). Go to Global Functions > Timeline Control and double-click "stop". This will result in the code you see at the right. |
|
Flash has a library of pre-made buttons you can use. Go to Window > Common Libraries > Buttons to open the button libraries. Look for a folder that has "playback" in the name. |
|
Find a button to use to play the movie (the name will be "play" or "right"). Drag an instance of the button to the stage. Find a button you can use to stop the movie. Drag an instance of the button to the stage. |
|
The buttons are usually quite small. If you want to enlarge them, select both buttons then use the Free Transform tool to resize them. |
|
Next you will add ActionScript to each button. Click once on the play button to select it. Open the Actions panel (F9). Go to Movie Clip Control and double-click "on". Make sure "release" shows up in the script. Go to Timeline Control and double-click "play". This will result in the code shown at right. |
|
Click once on the stop button to select it. Open the Actions panel (F9). Go to Movie Clip Control and double-click "on". Make sure "release" shows up in the script. Go to Timeline Control and double-click "stop". This will result in the code shown at right. |
|
Add sound to a button. Close or minimize the Actions panel and double-click on the Play button to edit the button symbol. Add a new layer and name it sound. Click in the Down frame and press F6 to add a keyframe. If you want the sound to play in the Over frame instead, insert a keyframe there. |
|
Find a sound file that is one of these file types:
Save the sound file to your folder. In Flash, go to File > Import > Import to Library and locate the sound file you want to use. Click on "Open". |
|
The sound file is now in your library. If you click on the name of the sound in the library, you will see a visual representation of the sound (waveform) in the preview window. There is a play button that allows you to listen to the sound. The sound is also listed in the Sound dropdown list in the Properties panel. |
|
Make sure you click in the frame where you want the sound to start. You can insert the sound in one of two ways:
|
|
Test your movie (Control + Enter) to see if your buttons work properly, and you hear the sound when you click on the Play button. |