Although event sounds normally play to the end, you can force them to stop at a specific keyframe. To issue an instruction to stop a specific sound, set that sound's Sync parameter to Stop. To stop playback of a sound 1. | Create a new 15-frame Flash document with two fairly long event sounds (at least 2 or 3 seconds each); place one sound in keyframe 1 and the other in keyframe 5. (For more detailed instructions, see "Adding Sounds to Frames" earlier in this chapter.) In this example, keyframe 1 contains the sound Rhythm.AIFF, and keyframe 5 contains the sound Melody.AIFF. | 2. | In the Timeline, at frame 8, insert a new blank keyframe (Figure 15.23). Figure 15.23. Inserting a new keyframe cuts off your view of the preceding sound's waveform in the Timeline. If the sound is an event sound, however, it continues playing even when the playhead moves past the keyframe. Flash cuts off the waveform at keyframe 8 because of the keyframe, but on playback, both event sounds continue to play after the playhead reaches keyframe 8. | 3. | Select keyframe 8. | 4. | In the Frame Properties tab of the Property inspector, from the Sound pop-up menu, choose Rhythm.AIFF. | 5. | From the Sync pop-up menu, choose Stop (Figure 15.24). Figure 15.24. To stop a sound's playback at a specific point in a movie, create and then select the keyframe where the sound should stop. In the Frame Properties tab of the Property inspector, from the Sound pop-up menu, choose the sound you want to stop. From the Sync pop-up menu, choose Stop. Here, the Stop instruction refers to the Rhythm sound. Flash uses this instruction to stop playback of the Rhythm.AIFF sound at keyframe 8. Flash places a small square in the middle of keyframe 8 in the Timeline to indicate that the frame contains a stop-sound instruction (Figure 15.25). Figure 15.25. In the Timeline, a small square in the middle of a keyframe indicates the presence of the stop-sound instruction. | 6. | Position the playhead in keyframe 1, and play your movie to hear the sounds in action. The Rhythm.AIFF sound starts immediately; Melody.AIFF kicks in at keyframe 5. When the playhead reaches keyframe 8, Rhythm.AIFF cuts out, but Melody.AIFF plays on even after the playhead reaches the end of the movie. | Tips The Stop setting and the sound that it stops can be in different layers. The Stop setting stops playback of all instances of the specified sound that are currently playing in any layer. To stop only one instance of a sound, set the Sync parameter of that instance to Stream; then, in the layer containing that instance, put a blank keyframe in the frame where you want that instance of the sound to stop. |