Using Event Sounds

I l @ ve RuBoard

One of the sound parameters available in the Frame Property Inspector is Sync. The Sync setting determines the way that Flash synchronizes the sounds in your movie. Sync has four settings: Event, Start, Stop, and Stream. The default is Event.

Event sounds play in their own Timeline. Flash synchronizes the beginning of an event sound with a specific keyframe in a movie, but then the event sound plays until Flash reaches the end of the sound clip or encounters an instruction to stop playing either that specific sound or all sounds. If it's long enough, an event sound continues to play after the movie ends. If your movie loops , every time the playhead pas es a frame containing an event sound, Flash starts another instance of that sound playing.

To understand the way sound synchronization works in Flash, it is helpful to work in a document that has identifying text in keyframes.

Independent Sounds Versus Synchronized Sounds

Unsynchronized sound clips play independently of the frames in a movie and can even continue playing after the movie ends. Flash starts these event sounds at a specific frame, but thereafter, event sounds play without relation to specific frames. On one viewer's computer, the sound may take 10 frames to play; on a slower setup, the sound may finish when only 5 frames have appeared.

Flash can also synchronize entire sound clips with specific frames. Flash breaks these streaming sounds into smaller pieces and at aches each piece to a specific frame. For streaming sounds, Flash forces the animation to keep up with the sounds. On slower setups, Flash draws fewer frames so that important actions and sounds stay together.

To set up a file for testing sounds:

  1. Create a 20-frame, 3-layer Flash document.

  2. Label the layers Objects, Sound 1, and Sound 2.

  3. In all layers, insert keyframes into frames 1, 5, 10, 15, and 20.

  4. In the Object layer, place identifying text on the Stage for each keyframe.

  5. Import into the movie's library several sounds of different lengths.

    This example uses a 15.8-second sound clip of a musical-scale passage, the Bucket Hit sound from Flash's common library of sounds, a wolf's howl, and some crickets chirping.

  6. Save the document as a template for use throughout this chapter, and name it SoundSync Template.

    For detailed instructions on saving documents as templates, see Chapter 1.

To make an assigned sound an event sound:

  1. Open a new copy of the SoundSync Template that you created in the preceding exercise. (Choose File > New From Template.)

  2. In the Timeline, select Frame 5 of the Sound 1 layer (Figure 14.18).

    Figure 14.18. Select the keyframe to which you want to assign a sound. Settings that you create in the Frame Property Inspector get applied to the selected keyframe.

    graphics/14fig18.gif

  3. In the Frame Property Inspector, from the Sound pop-up menu, choose the sound named Scale (Figure 14.19).

    Figure 14.19. In the Frame Property Inspector, choose a sound from the Sound pop-up menu.

    graphics/14fig19.gif

  4. From the Sync pop-up menu, choose Event (Figure 14.20).

    Figure 14.20. From the Sync pop-up menu, choose Event to make the assigned sound start in the selected keyframe and play to the end of the sound, without synchronizing with any subsequent frames of the movie.

    graphics/14fig20.gif

    The Scale sound is assigned to Keyframe 5 of the Sound 1 layer.

  5. Position the playhead in Frame 1, and play your movie (choose Control > Play).

    In a movie that has a standard frame rate of 12 fps, the 15.8-second Scale sound continues to play after the end of the movie.

graphics/01icon02.gif Tip

  • To understand better how Flash handles event sounds, choose Control > Loop Playback. Now play the movie again, and let it loop through a couple of times. Each time the playhead enters Frame 5, Flash starts another instance of the Scale sound, and you start to hear not one set of notes going up the scale, but a cacophony of bad harmonies. When you stop the playback, each sound instance plays out until its endan effect sort of like people singing a round.


To play overlapping instances of the same sound:

  1. Using the file that you created in the preceding exercise, to assign a sound to a later point in the movie's Timeline, do one of the following:

    • Select Frame 15 of the Sound 1 layer.

    • Select Frame 15 of the Sound 2 layer.

      Because Flash starts a new instance of an event sound, even if that sound is already playing, you have the choice of adding a second instance to the same layer as the first or adding it to a different layer.

  2. In the Frame Property Inspector, from the Sound pop-up menu, choose the sound named Scale.

  3. From the Sync pop-up menu, choose Event.

    The Scale sound is assigned to Keyframe 15 of whichever layer you chose (Figure 14.21).

    Figure 14.21. You can add a second instance of your sound and make it play on top of the first. Event sounds play in their own Timeline, so you're free to add the second sound to the same layer as the first (top). Alternatively, you can add the second sound to its own layer (bottom).

    graphics/14fig21.gif

  4. Position the playhead in Frame 1, and play your movie one time.

    When the playhead reaches Frame 5, the Scale sound starts. When the playhead reaches Frame 15, another instance of the Scale sound starts, and the two sounds play together (you hear two voices). When the first instance ends, you again hear only one voice.

Within a single layer, each frame can contain only one sound. To make Flash play multiple sounds at the same point in a movie, you must put the sounds in separate layers.

To start different sounds simultaneously :

  1. Open a new copy of the Sound Sync Template that you created earlier in this chapter. (Choose File > New From Template.)

  2. In the Timeline, select Keyframe 5 of the Sound 1 layer.

  3. In the Frame Property Inspector, from the Sound pop-up menu, choose Scale.

  4. From the Sync pop-up menu, choose Event.

  5. In the Timeline, select Keyframe 5 of the Sound 2 layer.

  6. In the Frame Property Inspector, from the Sound pop-up menu, choose a different sound.

    You could also import a new sound to your movie's library or open the Library window of another movie containing the sound you want to use and then drag a copy of the sound to the Stage. This example uses the Bucket Hit sound from Flash's common library of sounds.

    Flash places the waveform for the second sound in Keyframe 5 of the Sound 2 layer (Figure 14.22).

    Figure 14.22. To make two different sounds begin playing simultaneously, you must put each sound in a different layer.

    graphics/14fig22.gif

  7. In the Frame Property Inspector, from the Sync pop-up menu, choose Event.

  8. Position the playhead in Frame 1, and play your movie one time.

    When the playhead reaches Frame 5, Flash starts playing the Scale sound and the Bucket Hit sound simultaneously.

graphics/01icon02.gif Tip

  • All the information required to play an event sound lives in the keyframe to which you assigned that sound. When you play the movie, Flash pauses at that keyframe until all the information has downloaded. It's best to reserve Event Syncing for short sound clips; otherwise , your movie may be interrupted by long pauses for downloading sounds.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net