• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Adding Sound to Your Movies > Adding Sounds to Frames

Adding Sounds to Frames

You can assign a sound to a keyframe the same way that you place a symbol or bitmap: by selecting the keyframe and then dragging a copy of the sound from an open Library window (either that movie's or another's) to the Stage. You can also assign any sound that resides in the movie's library to a selected keyframe by choosing the sound from the Sound menu in the Sound panel.

To assign a sound to a keyframe:

1.
Open a Flash file to which you want to add sound.

The Ping-Pong animation that you created in Chapter 11 makes a good practice file. The movie contains four keyframes, in which a ball connects with a paddle. Adding sound can heighten the reality of that contact: You can make the sound realistic (say, a small thwock) or make it humorous, if the sound is unexpected (a wolf's howl, for example).

2.
Add a new layer for the sounds in your movie.

(For more detailed instructions, follow the steps in "Organizing Sounds in Separate Layers" earlier in this chapter.)

3.
Name the layer Sound.

4.
In the Timeline, select your new Sound layer, and add keyframes at frames 5, 10, 15, and 20.

These four keyframes match the keyframes in the animation in which the ball hits one of the paddles (Figure 14.11).

Figure 14.11. Create a separate layer for the sounds in your movie. In that layer, add a separate keyframe at each place where you want a sound to occur. Here, the keyframes correspond to the keyframes in which the ball makes contact with a paddle.


5.
From the Window menu, choose Common Libraries > Sounds.

The Library - Sounds window opens (it's one of the libraries that Macromedia provides with Flash). The library's background and editing functions are grayed out because you haven't opened the Sound.fla file—just its library. But you can drag sounds to your own Flash file.

6.
In the Library - Sounds window, choose the sound named Plastic Click (Figure 14.12).

Figure 14.12. Flash comes with a library of sounds for you to use in your movies. Choosing Window > Common Libraries > Sounds opens the Sounds Library without opening its parent movie. This makes sounds available for copying to other movies but prevents you from accidentally changing them in the original movie. Plastic Click makes a good Ping-Pong-ball sound.


Its waveform appears in the preview window.

7.
In the Timeline, select Keyframe 5 of the Sound layer.

This is the first frame in which the ball and paddle connect.

8.
Drag a copy of the Plastic Click sound from the Library window to the Stage of your movie.

Although sounds have no visible presence on the Stage, you must drag the sound copy to the Stage. On Mac and Windows, you see the outline of a box on the Stage. In addition, on the Mac, Flash highlights the Stage with a thick gray outline. When you release the mouse button, Flash puts the sound in the selected keyframe and displays the waveform in that keyframe and any in-between frames associated with it (Figure 14.13).

Figure 14.13. When you drag a sound from the Library window to the Stage, you see the symbol outline and Flash highlights the Stage just as it does when you drag a graphic symbol or button (top). A sound has no visible presence on the Stage, but Flash displays the sound's waveform in the Timeline (bottom).


9.
In the Timeline, select Keyframe 10 of the Sound layer.

This is the second frame in which the ball and paddle connect.

10.
Access the Sound panel.

11.
From the pop-up Sound menu, choose the sound named Plastic Click.

All the sounds in the movie's library are available from the Sound panel's Sound menu (Figure 14.14). You don't have to drag a copy of the sound to the Stage each time you want to turn that sound on in a keyframe.

Figure 14.14. In the Sound panel, the Sound pop-up menu lists all the sounds that are in the movie. From this menu, choose a sound that you want to assign to the keyframe that's currently selected in the Timeline.


For now, leave the other settings in the Sound panel alone. You learn more about them in later tasks.

12.
Repeat steps 7 and 8 (or 9 and 10) for keyframes 15 and 20.

Now you are ready to play the movie and check out the sounds. As each paddle strikes the ball, Flash plays the Plastic Click sound, adding a level of realism to your simple Ping-Pong animation.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint