
Page 1 of 3 As Tom Green mentioned in his end-of-2008 video "A Quick Tour of the Flash CS4 Interface," the latest version of Flash introduces a handful of eye-popping new tools. These are covered in detail in our latest collaborative effort, Foundation Flash CS4 for Designers (ISBN: 1430210931, by Tom Green and David Stiller, published by friends of ED). We've taken an introductory look at some of these new features already in this series — and there's more to come — but it may encourage you in the meanwhile to hear that certain workflows haven't really changed much in Flash CS4, even though the user interface was overhauled completely.
One of these workflows pertains to timeline-based audio. In this excerpt, we'll take a look at the two basic types of sound in Flash: event and streaming. In a sense, it doesn't matter what version of Flash you're working with, these principles apply across the board — and amazingly, they haven't been covered before in a Community MX article, so let's jump in!
Timeline sound is heard when a timeline's playhead passes over a frame that is associated with a sound asset. Flash has two types of sound: event and streaming. Event sound tells Flash to load a sound completely into memory — as soon as the playhead encounters the frame that contains the audio — before playing it. Once loaded, the sound continues to play, even if the movie's playhead stops, which means event sounds are not locked to the timeline. (Audio can be forced to stop, but that takes specific action on your part.)
In a 24 frames-per-second (fps) Flash movie, an audio file of three minutes' duration takes over 4,000 frames to play out completely. If you're hoping to synchronize that with animation in the same timeline, think again. If the resultant SWF is played back on a slower machine than yours, it's almost certain the audio will not conclude on the frame you expect. Also, a movie would take a long time to start playing, because Flash must load the sound fully before playback can begin. For this reason, Event sound is ideal for pops, clicks, and other very short sounds or in situations where the audio will be played more than once or looped. If you want to synchronize extended audio with timeline animation, use streaming sound.
Streaming sound is a sound that can begin playing before it has fully loaded into memory. The trade-off is that it must be reloaded every time you want to play it. This sound type is ideal for longer background soundtracks that play only once. Because it is locked in step with the timeline, streaming sound is the only realistic option for cartoon lip-synching, or any scenario that requires tight integration between audio and visuals.
Now that you know what to expect, let's work with both types.

Figure 1 Use the layer properties to 'zoom in" on the timeline
Being able to see the waveform on the timeline is a huge advantage, because you can now use the waveform's peaks or valleys to time animation or other events to the audio file in stream mode.
What you have just heard is a fundamental truth of an event sound: you can preview event sounds only by playing them in their entirety, and only from the keyframe in which they appear.
Keywords
Flash CS4, audio, event, stream