17.4. Synchronizing Sounds to Animation

Problem

You want to make sure that your sound remains synchronized with the animation.

Solution

Use the Stream setting for synchronizing your sound.

Discussion

Flash sounds can be synchronized a variety of ways, and each way has its own benefits. The streaming synchronization option is ideal when you want to make sure that that the Flash animation stays in step with the audio. When you select the Stream option for sound synchronization, Flash makes sure that the movie’s timeline plays back along with the sound. If Flash cannot draw the frames fast enough, it will automatically drop frames to keep up with the sound. This is important if you have a single, long sound that acts as a narration or soundtrack that needs to be in sync with the visual elements.

Flash sounds default to the Event synchronization, so if you want your sound to synchronize using the Stream option, you need to explicitly tell Flash to do this. Select the keyframe that contains the sound, and in the Property inspector, select Stream from the Sync menu. That is all there is to it.

Setting a sound to synchronize using the Stream setting is a simple process; however, there are a few things you should be aware of with sounds set to this synchronization type. First of all, unlike sounds set to synchronize as Event or Start, those set to Stream play only as long as there are enough frames in the layer in which the sound has been placed. So when you use stream sounds, make sure that you ...

Get Flash 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.