Sounds

Before a sound can be used it must be imported. Choose "Movie" > "Import Sound" or drag sound file into Flash Designer document. Flash Designer supports WAV and MP3 sounds. To display currently loaded sounds choose "Movie" > "Sounds" command.

Frame Sounds

Frame sound starts playing when Flash player displays the frame. To define the sound choose "Frame" > "Frame Sound" command. By default the sound starts before the frame is displayed (after intro animations). To change this choose "Frame" > "Animation Properties" and change "Start Sound On" option.

To add a background sound

Choose "Movie" > "Import Sound" and select loop1.mp3 file (or your own soundtrack). Click OK to import it. Click OK in the Sounds list. Select the first frame of the movie (for example "Frame 1) and choose "Frame" > "Frame Sound" command. (If "Frame Sound" is grayed out you have to select the first non-Master frame in the Frame List). Select the sound file and click OK. Hit F9 to test the sound.

Exclusive sound mode

Exclusive sound mode will stop other sounds playing and prevent playing 2 sounds simultaneously. Choose "Frame" > "Animation Properties" and change "Start Sound On" option to "Exclusive mode".

Adjusting frame duration to the length of the sound

Choose "Movie" > "Sounds" command, select the sound and read sound duration in seconds. Click Cancel. Choose Frame > Frame Delay and adjust "Show Frame for" to the length of the sound so the sound and the frame will finish at the same time.

Event Sounds

Event sounds will play when the user clicks an item. To define an event sound choose "Item" > "Sounds" commands.

To assign a sound to a button

Choose "Movie" > "Import Sound" and select one of the sound files (for example AIP.wav). Click OK to import it. Click OK in the Sounds list. Select the button and choose "Item" > "Sounds" > "OnClick". Select the sound file and click OK. Hit F9 to test the click.

To remove the sound from the button

Select the button and choose "Item" > "Sounds" > "OnClick". Select option and click OK.

To stop the sound on click

Select the button and choose "Item" > "Sounds" > "OnClick". Select the sound to stop and click "Stop" checkbox. Click OK.

To create a button that stops all sounds (mute button)

Draw or import a button. Select the button and choose "Item" > "Actions" > "OnClick". Select ActionScript and type the command:

stopAllSounds();

Click OK.

Streaming Soundtracks

You can use WAV format sound files and place them in your Flash movie as streaming sound, music that plays in the background when movie is displayed. The WAV file must be saved in PCM compressed format.

To add the sound to the movie in Flash Designer:

  1. Open your animation in Flash Designer
  2. Choose "Movie" > "Export Options"
  3. Click "Browse" in streaming sound to browse for WAV file
  4. Specify how many times the sound should be played (default is 1)
  5. Click OK to confirm

Specifying the iteration count
By default each sound is played once. If the animation loops after it comes to the end, the sound starts every time the animation loops. If you specify iteration count greater than one, the sound will play continously during the movie.

File Optimization

You can achieve better compression results by using lower sample rates of your sound file. If you choose stereo sound instead of mono the file will grow respectively. If your sound is 44kHz Stereo and you want to keep your SWF file small, use Sound Recorder to resample your sound to lower rate, for example 11kHz mono.

To verify compression format:

  1. Open Sound Recorder from Start menu > All programs > Accessories.
  2. Open the WAV file in Sound Recorder.
  3. Choose File > Properties.
  4. The file should be compressed in PCM format.
  5. If not, click "Format Now" and choose PCM as the format.