cm tutorials - learning flash basics - sort of - march 02

Macromedia Flash5


Introduction

The Interface

Flash Exercises:
   Layers
   Color
   Drawing
   Buttons
   Symbols
   Animating
   Sound

Saving and Publishing

Flash Examples

 

Using Sound in Flash

There are several ways to use sound in Flash. You can loop sounds to play continuously, independent of the timeline, or synchronize your sounds to an animation. You can import and edit your sounds in the Sound Panel.

Importing

Import sounds into Flash by choosing Import from the File menu. The following audio file formats can be imported into Flash:

  • WAV
  • AIFF
  • MP3

If you have QuickTime 4 or higher, you can also import these file formats:

  • Sound Designer II (Macintosh)
  • Sound Only QuickTime Movies (Macintosh and Windows)
  • Sun AU (Macintosh and Windows)
  • System 7 Sounds (Macintosh)
  • WAV (Macintosh and Windows)

Flash stores audio files in the Library as a symbol along with the graphics, movies and buttons. Sound files are indicated by a loudspeaker icon. Because the sound is a symbol, you only need one copy of it and you can use it in many ways in your Flash movie. In the Library and on the Timeline, audio files are represented as sound waves.

Two types of sounds in Flash -- event sounds and stream sounds

  • Event sounds must download completely before they start playing and they will continue playing until explicitly stopped (usually by a stop action). Event sounds are associated with an event such as a mouse click, and are independent of the Timeline.
  • Stream sounds begin playing as soon as there's enough data to play. These sounds are synchronized to the timeline. Flash forces the animation to keep in sync with the sound. If it can't draw frames fast enough, Flash will drop frames to keep the sound in sync.

Editing with the Sound Panel

The Sound Panel allows you to modify the properties of the selected sound, for example:

  • specify if the sound is an Event or Stream
  • start a new sound, or Stop the sound
  • apply effects to the sounds, such as None (which strips any previous effects off the sound), Fade In or Out, Left to Right, etc.
  • If you choose Custom, you can modify the in and out points of the fade, the duration, etc. in the window that opens up. Click on the boxes at the corners of each channel and also add points along the line by clicking.

Exercise:

  • Import a sound file by choosing Import from the File menu. You can download a sample .wav file named slide_whistle_3x.wav. If you have Flash you can download the finished sound.fla file. If you don't have Flash, a 30-day trial version is available at Macromedia.

  • Open the Library Panel, and click on the sound symbol you just imported. You will see it in the Library window with a play arrow. You can listen to the sound you just imported by clicking on the arrow at the top right of the Library window.
  • Name and select layer: Sounds
  • Add keyframes at frame 1 and frame 45 (or somewhere on the Timeline past the duration of the sound). It's not necessary to do this, but it gives you a look at the file in the Timeline.
  • Drag the sound onto the stage. You should see it on the layer as a waveform. You can get a better look at this by increasing the height of your layer.
  • From the Modify menu, choose Layer.

    Sound Layer
  • At the bottom of this window, you can change the layer height. Change it to 300% and click OK.
  • Open the Sound Panel. Select the sound on the Timeline. The information about that sound file will show up in the Sound Panel. It will also be visible in the top pull-down menu. If you have other sounds imported, they will be in the menu also. You can change the sound file you're editing from here. Directly under that you will see the sound file information, MHz and file size.

You can apply different effects to your sound

  1. None - choosing this will remove any previous effects
  2. Left channel
  3. Right channel
  4. Fade left to right
  5. Fade right to left
  6. Fade in
  7. Fade out
  8. Custom – when you choose this, another window will open, allowing you to edit both audio channels.

The edit button opens up the same audio channel editor. Choose each effect, open the editor and look at each effect. If you click in one of the channels, it will change to Custom, but these effects can be used as starting points to get the effect you want or use them as is.
The best way to get a feel for the sound editor is to apply each effect to your sound, listen to it and try some things in the custom effect editor.

Below the effects panel is the sync menu. It has the following options:

  1. Event – associated with specific actions, not tied to the timeline (like a sound accompanying a mouse click)
  2. Start – same as Event, but will create a new instance of that sound if it is already playing.
  3. Stop – stops the specified sound
  4. Stream – syncs the sound with the animation, forces the animation to play at the same rate as the sound, dropping frames if necessary.

You can loop the sound the number of times you type in the box. Don't loop streaming sound; it will increase your file size dramatically.

Have fun!

TOP