The point of this exercise is to get you more familiar with how sounds work and where you put them in your movie. In this exercise we will add a sound to a button so that when the end user clicks the button, a small camera sound will play. This does two things: First, it's an aural indicator to end users that they successfully clicked the button. Second, if used properly, it will create an experience for the end users that make them believe the button has physical qualities and actually makes that noise when clicked! This is the ultimate goal in Flash development—making the end users forget for a moment that they are actually sitting at their desks, believing that they're in the space you created. Sound can play a huge role in creating this illusion.
1. | Create a new document. Save this file as loudButton.fla. |
2. | You can either create your own button or use a stock one from the common libraries. Choose Window, Other Panels, Common Libraries, Buttons. Choose any button you like and drag an instance of it out onto the stage.
|
3. | Even though I just gave you a speech about not using stock Flash sounds, that's exactly what we're going to do here! However, I am not recommending that you publish this project. It's simply a learning tool.
|
4. | Choose Window, Other Panels, Common Libraries, Sounds to open the Sounds common library. Notice that you can preview the sound by clicking the Play button in the Preview window of the library, as shown in Figure 7.1. Preview the various sounds until you find the one you like.

|
5. | Double-click the button to go into the button symbol's editing mode. Inside the button, create a new layer and name it sound. |
6. | Insert a keyframe in the Down state on the sound layer. Notice the hollow circle in the frame, which indicates that there is no content in this frame and on this layer. This is the frame we're going to use to add the sound.
|
7. | With the sound layer still active and the play head on the Down state, drag the sound from the library and drop it on the stage. Notice the small waveform inside the Down state, as shown in Figure 7.2, indicating that there is a sound on that frame. If you have the frame selected, notice that the Properties Inspector offers some sound options.
 |
8. | Come back to scene 1 and test the movie by choosing Control, Test Movie. |
9. | Click the button to hear the sound. Not bad, huh?
|