8.2. Incorporating SoundFlash 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 FilesBefore 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
To import a sound file:
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. |
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:
|
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:
|
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.
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).
Test the soundtracked animation by choosing Control Test Movie .
You hear a buzzing sound as the fly loops its way across the test movie.
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).
Select Insert Timeline Blank Keyframe .
Flash places a blank keyframe (a hollow circle) in Frame 20.
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.
In the Property Inspector, click the arrow next to Sync and then, from the drop-down list that appears, choose Start .
In the soundtrack layer, click to select Frame 22 .
On the Stage, you see a very satisfied frog (Figure 8-10).
Select Insert Timeline Blank Keyframe .
Flash places a blank keyframe (a hollow circle) in Frame 22.
In the Property Inspector, click the arrow next to Sound and then, from the drop-down list that appears, choose zot.wav .
Click the arrow next to Sync and then, from the drop-down list that appears, choose Stop .
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 !
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:
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.
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.