Section 8.2. Incorporating Sound


8.2. Incorporating Sound

Flash lets you score your animations much the same way a filmmaker scores a movie. You can add a soundtrack that begins when your animation begins and ends when it ends. Or you can tie different sound clips to different scenes (series of frames ) of your animation. For example, say you're creating an instructional animation to demonstrate your company's egg slicer. You can play music during the opening seconds of your animation, switch to a voice-over to describe your product, and end with realistic sounds of chopping, slicing, and boiling to match the visual of cooks using your product in a real-life setting.

You can also tie sounds to specific events in Flash. For example, say you want your instructional animation to contain a button someone can press to get ordering information. You can tie the sound of a button clicking to the Down state of your button, as you'll see in Chapter 11, so that when someone clicks your button, she actually hears a realistic clicking sound.

Figure 8-5. When you tell Flash to open the first in a series of sequentially numbered files (top), the program asks if you'd like to import the entire series (bottom). This trick works only if the numbers appear at the end of the file name just before the extension and if you don't skip any numbers in the series. And since Flash begins importing with the numbered file you choose, it doesn't go back and pick up files containing lower numbers .


Note: PreVersion 8, Flash shipped with a library of sound effects you could add to your animations. But Macromedia discovered that most folks weren't using them, so they pulled them in Flash 8. (Seems there isn't much call for robot noises and doorbell chimes in production-level animation circles.) Creating digitalized sounds from scratch is a big enough subject to warrant its own book, and if you're interested in the recording and editing process, you might want to check out Producing Great Sound for Digital Video by Jay Rose (CMP Books). But if experimenting with preproduced sound clips fits your particular project, check out the box on Section 8.2.2.

8.2.1. Importing Sound Files

Before you can work with sound in Flash, you need to import a sound file either to the Stage, the Library, or both. Flash lets you import a variety of sound files, as you can see in Table 8-2.

Table 8-2. Audio File Formats You Can Import into Flash

File Type

Extension

Note

MPEG-1 Audio Layer 3

.mp3

Works on both Mac and Windows.

Windows Wave

.wav

Works on Windows only, unless you have QuickTime 4 (or later) installed; then you can import .wav files into Flash on the Mac, too.

Audio Interchange File format

aiff, .aif

Works on Mac only, unless you have Quick-Time 4 (or later) installed; then you can import AIFF files into Flash running in Windows, too.

Sound Designer II

.sd2

Only works on Mac, and only if you have QuickTime 4 (or later) installed.

Sound-only QuickTime movies

.mov, .qtif

Works on both Windows and Mac, but only if you have QuickTime 4 (or later) installed.

Sun AU

.au

Works on both Windows and Mac, but only if you have QuickTime 4 (or later) installed.


To import a sound file:

  1. Select File Import Import to Library .

    The Import to Library dialog box appears.

  2. In the "File name" field, type the name of the sound file you want to import (or, in the file window, click the file to have Flash fill in the name for you) .

    To see the different types of sound files you can import, you can either click the pop-up menu next to "Files of type," or check out Table 8-2.

  3. Click Open .

    The Import to Library dialog box appears, and Flash places a copy of the imported sound file into the Library (Figure 8-6, top). When you click to select any of the frames in your Timeline, the sound appears in the Property Inspector.

8.2.2. Adding an Imported Sound to a Frame (or Series of Frames)

You can tell Flash to play an animated sound beginning with any frame of your animation. Depending on the settings you choose, Flash keeps playing the sound file either until it finishes (regardless of whether your animation is still playing or not) or until you tell it to stop.

The example below shows you how to use the stream option to synchronize a short sound clip of a fly buzzing to an animated sequence showingwhat else?a buzzing fly. Then you see how to start and stop a second sound (the sound of the fly becoming a frog's lunch ).

Figure 8-6. Top: The visual representation Flash displays when you select an imported sound clip is called a waveform. (As you see on Section 8.2.3, you use this waveform when you're editing a sound clip in Flash.) When you click the Play button Flash displays along with the waveform, you can preview the sound.
Bottom: At the same time that it puts a copy of your imported file in the Library, Flash makes the imported file available in the Frame Properties panel.

To add an imported sound to a series of frames:

  1. Open the file happy_frog.fla .

    You can find this file on the "Missing CD" page. (To see a working version, check out happy_frog_sound.fla.

  2. In the Layers window, click to select the topmost layer (Guide: Layer 1) .

    Flash highlights the layer name, as well as all the frames in that layer.

  3. Select Insert Timeline Layer .

    Flash creates a new layer and places it above the selected layer.

    Double-click the new layer name and type in soundtrack , as shown in Figure 8-7.

  4. Click the first keyframe in the soundtrack layer .

    In the Property Inspector, Flash activates the Frame properties, including those related to sound.

  5. Click the arrow next to the Sound field and, from the drop-down list that appears, choose the imported sound file fly_buzz.wav .

    Alternatively, you can drag the sound file symbol from the Library to the Stage. Either way, the sound properties for the file appear at the bottom of the Property Inspector, and the waveform for the buzzing fly sound appears in the soundtrack layer (Figure 8-8).

    DESIGN TIME
    Using Sound Effectively

    If you've ever watched a movie that had a breathtakingly beautiful (or laughably cheesy) musical score, you've experienced the power of sound firsthand. Effective sound can elevate a decent visual experience into the realm of art. Ineffective sound can turn that same visual experience into a nerve - shredding mess.

    If you're thinking about adding sound to your animation, consider these points:

    • Why do you want to add sound ? If your answer is to add emotional punch; to cue your audience aurally to the interactive features you've added to your animation, such as buttons that click or draggable objects that whoosh ; or to deliver information you can't deliver any other way (such as a voice-over explaining an animated sequence or realistic sounds to accompany the sequence); then by all means go for it. But if your answer is "Because I can," you need to rethink your decision. Soundas much as any graphic elementneeds to add to the overall message you're trying to deliver or it'll end up detracting from that message.

    • Are you sure your audience will be able to hear your sound ? Sound files are big. They take time to download. If you're planning to put your animation on a Web site, Flash gives you a couple of different options for managing download timebut keep in mind that not everyone in your audience may have a fast connection or the volume knob on her speaker turned up. (For that matter, some folks are deaf. Check out the box on Section 3.6.3 for tips on providing hearing-impaired folks with an alternate way of getting your information.)

    • How important is it that your soundtrack matches your animation precisely ? Flash gives you options to help you synchronize your sound clips with your frames. But you can't match a 2-second sound clip to a 10-second animated sequence without either slowing down the sound or speeding up the animation. If you want to match a specific sound clip to a specific series of frames, you may need to edit one (or both) to get the balance right before you begin synchronizing them in Flash.



    Note: If you don't see the waveform on the Timeline after you've added it, click on the first keyframe and then Shift-click Frame 20 to select all of the frames, from 1 to 20. Finally, choose Insert Timeline Insert Frame.

    In the Property Inspector, click the arrow next to the Sync field and, from the first drop-down list that appears, choose Stream .

    Your synchronization choices include:

    Event . Tells Flash to give the sound its very own Timeline. In other words, Flash keeps playing the sound until the sound finishes, regardless of whether or not the animation has ended. If you repeat (or loop) the animation in the Controller, Flash begins playing a new sound clip every time the animation begins againwith the result that, after a dozen or so loops , you hear a dozen flies buzzing! Flash assumes you want your sound to behave this way unless you tell it otherwise .

    DESIGN TIME
    Stock Images, Sounds, and Video Clips

    If you're using Flash to create stuff for workpresentations, tutorials, Web advertisements, marketing materials, or what have youyou or someone else on your team is probably going to be creating all your content from scratch. But there's a place in every Flash fan's toolkit for stock media : generic images, sound clips, and video clips that you purchase (or, more rarely, get for free) from companies whose job it is to produce such items.

    Typically, you pay a modest fee to use stock images, sounds, and video clips. Sometimes, you also pay a royalty fee based on the number of times you use a stock element in your animation.

    If you're using Flash to snazzy-up your personal Web site, you may find stock media is just what the doctor ordered: You get something cool that you can use for a relatively low price without having to invest time and money buyingaudio and video equipment and tracking down that twister yourself. But even professional animators have been known to rely on stock media occasionally because it lets them test out a concept quickly and cheaply.

    Places to find stock images, sound clips, and video clips abound on the Web. Here are a few you might want to check out:

    www.freestockfootage.com
    www.bigshotmedia.com
    www.wildform.com/videolibrary
    www. flashkit .com/soundfx/
    www.a1freesoundeffects.com/household.html
    www.findsounds.com/
    http://creative.gettyimages.com

    Figure 8-7. Technically speaking, you can add a sound clip to any layer you like. But if you're smart, you create a separate layer for your sounds (some folks even create a separate layer for each sound). Creating separate layers helps keep your keyframes from becoming so cluttered that you can't see everything you've added to them. It also helps you find your sounds quickly in case you want to make a change down the road.

    Tip: You add a sound to a button the same way you see demonstrated here with two exceptions: You typically add a sound file for a button to the button's third, or Down, frame (so that the sound plays when your audience clicks down on the button) and you leave the synchronization option set to Event. To see an example, check out the file button_sound.fla on the "Missing CD" page.
    Figure 8-8. It's rare that the length of a sound clip precisely matches the length of the animated clip to which you want to assign it. Here, the sound clip stretches only to Frame 14but the layer showing the buzzing fly stretches all the way to Frame 20. You could cut and paste the sound to fill those last four frames so that the fly doesn't become uncharacteristically silent all of a sudden, but Flash gives you much easier ways to match a sound clip to a frame span: streaming, repeating, and looping.

    Start . Similar to Event, but tells Flash not to begin playing a new sound if the animation repeats.

    Stop . Tells Flash to stop playing the sound.

    Stream . Tells Flash to match the animation to the sound clip as best it can, either by speeding up or slowing down the frames-per-second that it plays the animation. This option is the one you want for lip-synching , when you're trying to match a voiceover to an animated sequence featuring a talking head. Because choosing this option also tells Flash to stream the sound file (play it before it's fully downloaded in those cases where you've put your animation on a Web site), someone with a slow connection can get a herky-jerky animation.


    Tip: To preview your newly added sound on the Stage, drag ( scrub ) the playhead along the Timeline. You can scrub forward or backward. To hear just the sound in a specific frame, Shift-click the playhead over that frame. Flash keeps playing the sound until you let up on either the Shift key or the mouse.
  6. From the second drop-down list next to the Sync field, choose Loop .

    Loop tells Flash to repeat the sound clip until the animation ends. Repeat lets you tell Flash how many times you want it to play the sound clip (regardless of the length of the frame span).

  7. Test the soundtracked animation by choosing Control Test Movie .

    You hear a buzzing sound as the fly loops its way across the test movie.

  8. Add a second, short sound clip to your animation to make the scene more realistic. To do so :

    In the soundtrack layer, click Frame 20.

    On the Stage, you see the frog's tongue appear (Figure 8-9).

    Figure 8-9. Beginning sound clips in individual keyframes lets you change the soundtrack at the exact moment your visuals change. Here, you see the frog's tongue appear in Frame 20 of the frog layer, and it doesn't change until Frame 22 (which contains the final keyframe of the animation). So to match the zot! sound to the tongue action, you want to tell Flash to start playing the zot.wav file on Frame 20 and stop playing it on Frame 22. The following steps tell you how to match the sound and action.
  9. Select Insert Timeline Blank Keyframe .

    Flash places a blank keyframe (a hollow circle) in Frame 20.

  10. In the Property Inspector, click the arrow next to Sound and then, from the drop-down list that appears, choose zot.wav .

    Flash places the waveform for the sound file onto the Timeline, beginning with Frame 20.

  11. In the Property Inspector, click the arrow next to Sync and then, from the drop-down list that appears, choose Start .

  12. In the soundtrack layer, click to select Frame 22 .

    On the Stage, you see a very satisfied frog (Figure 8-10).

  13. Select Insert Timeline Blank Keyframe .

    Flash places a blank keyframe (a hollow circle) in Frame 22.

  14. In the Property Inspector, click the arrow next to Sound and then, from the drop-down list that appears, choose zot.wav .

  15. Click the arrow next to Sync and then, from the drop-down list that appears, choose Stop .

  16. Test the new sound by choosing Control Test Movie .

    You hear a buzzing sound as the fly loops its way across the test movie. But as the frog's tongue appears, the buzzing stops and you hear a satisfying zot !


Tip: If you don't hear any sounds, select Control and see whether the checkbox next to Mute Sounds is turned on. If it is, click it to turn it off.
Figure 8-10. Because the synchronization option for the zot! sound was set to start in Frame 20, Flash automatically stops playing the zot.wav sound file when the animation ends. Still, it's good practice to tell Flash specifically when you want it to stop playing a sound file. You'll be glad you did when you come back to the animation a week or two later because you won't have any cleanup to do before you add additional sounds to the Timeline.

8.2.3. Editing Sound Clips in Flash

You can change the way your imported sound clips play in Flash. You can't do anything super-fancy, like mix down multiple audio channels or add reverbFlash isn't a sound-editing program, after allbut you can crop the clips, add simple fade-in /fade-out effects, and even choose which speaker (right or left) they play out of.

First, import the sound clip you want to edit, as described on Section 8.2.1. To edit it, follow these steps:

  1. On the Timeline, click any frame that contains a portion of the sound clip's waveform .

    Flash activates the sound options you see in the Property Inspector.

  2. In the Property Inspector, click the drop-down box next to Edit and then choose from the following menu options :

    Left channel . Tells Flash to play the sound through the left speaker.

    Right channel . Tells Flash to play the sound through the right speaker.

    Fade left to right . Tells Flash to begin playing the sound through the left speaker, and then switch midway through the clip to the right speaker.

    Fade right to left . Tells Flash to begin playing the sound through the right speaker, and then switch midway through the clip to the left speaker.

    Fade in . Tells Flash to start playing the sound softly and build to full volume.

    Fade out . Tells Flash to start playing the sound at full volume and taper off toward the end.

    Custom . Tells Flash to display the Edit Envelope window you see in Figure 8-11, which lets you choose the in point (the point where you want Flash to begin playing the sound) and the out point (where you want the sound clip to end). You can also choose a custom fading effect; for example, you can fade in, then out, then in again.


Note: Clicking the Property panel's Edit button displays the same Edit Envelope window you see when you choose the Custom option.



Flash 8
Flash Fox and Bono Bear (Chimps) (Chimps Series)
ISBN: 1901737438
EAN: 2147483647
Year: 2006
Pages: 126
Authors: Tessa Moore

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