Flash CS3  |  Go to CS4 Help

Add a sound to the Timeline

You can add a sound to a document using the library, or you can load a sound into a SWF file during runtime, using the loadSound method of the Sound object. For more information, see loadSound (Sound.loadSound method) in the ActionScript 2.0 Language Reference or Sound Class in the ActionScript 3.0 Language and Components Reference.

  1. Import the sound into the library if it has not already been imported.
  2. Select Insert > Timeline > Layer.
  3. With the new sound layer selected, drag the sound from the Library panel onto the Stage. The sound is added to the current layer.

    You can place multiple sounds on one layer or on layers containing other objects. However, it is recommended that each sound be placed on a separate layer. Each layer acts as a separate sound channel. The sounds on all layers are combined when you play the SWF file.

  4. In the Timeline, select the first frame that contains the sound file.
  5. Select Window > Properties > Properties, and click the arrow in the lower-right corner to expand the Property inspector.
  6. In the Property inspector, select the sound file from the Sound pop-up menu.
  7. Select an effect option from the Effects pop-up menu:
    None
    Applies no effects to the sound file. Select this option to remove previously applied effects.

    Left Channel/Right Channel
    Plays sound in the left or right channel only.

    Fade Left To Right/Fade Right To Left
    Shifts the sound from one channel to the other.

    Fade In
    Gradually increases the volume of a sound over its duration.

    Fade Out
    Gradually decreases the volume of a sound over its duration.

    Custom
    Lets you create custom in and out points of sound using the Edit Envelope.

  8. Select a synchronization option from the Sync pop-up menu:
    Note: If you are placing the sound on a frame other than Frame 1 in the main Timeline, select the Stop option.
    Event
    Synchronizes the sound to the occurrence of an event. An event sound, such as a sound that plays when a user clicks a button, plays when its starting keyframe first appears and plays in its entirety, independently of the Timeline, even if the SWF file stops playing. Event sounds are mixed when you play your published SWF file. If an event sound is playing and the sound is instantiated again (for example, by the user clicking the button again), the first instance of the sound continues to play and another instance begins to play simultaneously.

    Start
    The same as Event, except that if the sound is already playing, no new instance of the sound plays.

    Stop
    Silences the specified sound.

    Stream
    Synchronizes the sound for playing on a website. Flash forces animation to keep pace with stream sounds. If Flash can’t draw animation frames quickly enough, it skips frames. Unlike event sounds, stream sounds stop if the SWF file stops playing. Also, a stream sound can never play longer than the length of the frames it occupies. Stream sounds are mixed when you publish your SWF file.

    An example of a stream sound is the voice of a character in an animation that plays in multiple frames.

    Note: If you use an mp3 sound as a stream sound, you must recompress the sound for export. You can export the sound as an mp3 file, with the same compression settings that it had on import.

  9. Enter a value for Repeat to specify the number of times the sound should loop, or select Loop to repeat the sound continuously.

    For continuous play, enter a number large enough to play the sound for an extended duration. For example, to loop a 15-second sound for 15 minutes, enter 60. Looping stream sounds is not recommended. If a stream sound is set to loop, frames are added to the file and the file size is increased by the number of times the sound is looped.

  10. To test the sound, drag the playhead over the frames containing the sound or use commands in the Controller or the Control menu.

Comments

Comments are no longer accepted for Flash CS3. Flash CS4 is the current version. To discuss Flash CS3, please use the Adobe forum.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/UsingFlash/WSd60f23110762d6b883b18f10cb1fe1af6-7ce4.html