Adding Sound to the Timeline


In addition to the use of sounds to enhance the interactivity of buttons, another popular use for sound in Flash is to provide a background score. The simplest way to achieve this is to place the sound within its own layer in the Main Timeline (Scene 1), at the precise frame in which you want the sound to begin. To do this, you must first import the sound (as we described earlier in this chapter) and create a new layer for it.

On the CD-ROM 

If you don't have access to sounds, you can use the sample sound atmospheres_1 to practice. This sound is in the ch15 folder of the Macromedia Flash 8 Bible CD-ROM. It is available in both WAV and AIF formats.

Adding sound files to the timeline is similar to assigning sound to a button. To add sounds to a timeline, follow these steps:

  1. Add a new layer in the Timeline window and label the layer with the name of the sound.

    You can use a name such as "sound" or "background track."

  2. Create a keyframe on the sound layer at the frame where you want the sound to begin.

  3. With that keyframe selected, open the Property inspector.

    Make sure you have expanded the view to show all of the sound attributes.

  4. If you remembered to import the sound that you want to use, you can now choose that sound clip from the Sound drop-down menu.

    If you find yourself stuck at this point, review the preceding steps and/or retrace your steps through the methodology for adding sound to a button.

  5. From the Effect menu, choose how the sound should be handled by Flash.

    The Effect menu offers several preset fading and panning treatments, plus Custom, which invokes the Edit Envelope dialog box. For no special effect, choose None. For more about the Effect presets and the Edit Envelope dialog box, refer to the subsequent section, "Editing Audio in Flash."

  6. From the Sync menu, choose one of four options — Event, Start, Stop, or Stream — to control how you want the sound to be synchronized.

    See the next section, "Organizing Sounds on the Timeline," for a detailed explanation of Sync options.

  7. Specify how many times you want the sound to loop.

    To loop the sound indefinitely (for example, as a background track), choose Loop in the second drop-down menu in the Sync parameters. If you want the sound to loop only for a specific number of times, choose Repeat in the menu and enter a number in the text field to the right of the menu. For specific information about looping Stream sounds, refer to the next section.

  8. Perform any last-minute editing or finessing of the sound file (see "Editing Audio in Flash" later in this chapter).

Your sound is now part of the timeline. Its waveform is visible on the layer to which it was added. Test your sound by pressing the Enter key on your keyboard, which plays the timeline. Or, for sound with a Sync setting of Stream, manually "scrub" the sound by dragging the Playhead across the timeline. To perform the most accurate test of the sound, use either Control ð Test Scene or Control ð Test Movie to see and hear it as a Flash movie file (.swf).

Tip 

If you sync a sound to the timeline using the Stream feature, you should test your Flash movie file (.swf) on various platforms and machines with different processor speeds, especially if the timeline is always playing animation. What looks and sounds good on a fast Pentium IV might be less impressive on an underpowered legacy machine, like a firstor second-generation Pentium machine.




Macromedia Flash 8 Bible
Macromedia Flash8 Bible
ISBN: 0471746762
EAN: 2147483647
Year: 2006
Pages: 395

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