Adding Sounds to Frames

I l @ ve RuBoard

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 pop-up menu in the Frame Property Inspector.

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" 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.

    graphics/14fig11.gif

  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 filejust 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 Flash's built-in library of sounds without opening its parent movie.This method makes sounds available for copying to other movies but prevents you from changing them accidentally in the original movie. Plastic Click makes a good Ping-Pong-ball sound.

    graphics/14fig12.gif

    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. As you drag the sound, you see the outline of a box on the Stage. 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 (top). A sound has no visible presence on the Stage, but Flash displays the sound's waveform in the Timeline (bottom).

    graphics/14fig13.gif

  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 Frame Property Inspector.

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

    All the sounds in the movie's library are available from the Frame Property Inspector's Sound pop-up 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 Frame Property Inspector, the Sound pop-up menu lists all the sounds that are in the movie. From this menu, you can choose a sound that you want to assign to the keyframe that's currently selected in the Timeline.

    graphics/14fig14.gif

    For now, leave the other settings in the Frame Property Inspector alone. You learn more about them in later tasks .

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

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

    Figure 14.15. For each spot in the movie where a sound should occur, add a sound to a keyframe in the sound layer.

    graphics/14fig15.gif

graphics/01icon02.gif Tip

  • Can't remember what sound that little squiggly waveform is? With tooltips active (choose the option in the General tab of the Preferences dialog box), let the mouse pointer hover over the waveform in the Timeline. Flash displays the name of the sound.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net