Chapter 7, Sound
#54 The Ubiquitous Sound-Kicker Hack
Finally, click the Edit button on the Properties panel, and use the Volume
Envelope control points, as shown in Figure 7-8, to set the volume of your
stream sound to zero.
This gives you a stream sound of duration 1 frame and zero volume. This
sound “kicks” the Flash Player sound engine into treating the entire time-
line as if it contains stream sounds, forcing it to sync all sounds (including
event sounds) to the timeline. Testing will show that your previously unsyn-
chronized event sounds play nearly seamlessly, allowing smoother and more
reliable sound transitions.
Not being able to sync event sounds has put a lot of designers off trying any-
thing complicated with Flash sound, especially in the pre-Flash MX days
before Sound.onSoundComplete( ).
Creating a SWF containing kicker-synched sounds and loading it into a level
using loadMovieNum( ) is an easy way to create a downloaded sound track
that contains the reusability of event sounds with the streaming ability of
stream sounds. For more sound synchronization capabilities, use cue points
Figure 7-8. Volume Envelope control for a sound