Flash lets you add sounds into your presentation. The sounds are added in Frames in the Timeline.
There are two types of sounds: event sounds and stream sounds.
- An event sound needs to download completely before it starts to play. Event sounds continue to play until they are done or you explicitly stop them.
- A stream sound starts to play as soon as enough data downloads for the first few frames. Stream sounds are synchronized to the Timeline.
Flash supports the following sound formats: ASND (from Adobe Soundbooth), WAV, AIFF, AU, MOV, and MP3.

First, you need to import the sound into the Library. Then, you add it in Frames in your Timeline.
To import a sound file, click File -> Import -> Import to Library, then choose an audio file from your computer and click Open. Flash places a copy of the imported sound file into the Library.
- You can also use the sample Sounds library that comes with Flash, which can be opened from Window -> Common Libraries -> Sounds.
The sounds added in the Library will be included into the Flash presentation (the SWF file), so the size of the SWF file will increase depending on the size of the imported audio file.

Once the sounds are in the Library, you can add them in the Timeline using the Properties panel of the Frames (see the image below).
In Timeline, click on a frame where you wand to begin the sound, then in the "Properties panel", at the Name option (from the Sound sub-menu) choose the sound you want to use.
Properties for sound
The Sound sub-menu contains a few options to define individual properties for every sound in your Flash document:
- Name - contains a list with the sounds included in the Library.
- Synk: - Effect: - Repeat - specifies how many times the sound will be repeated. Loop sets to repeat the sound forever.

Here is an example of how to use a sound from the Sounds library that comes with Flash:
  1. Open a new Flash document. Click the Window -> Common Libraries -> Sounds to open the "Library - Sounds" window (displayed in the image below).
    Open the main Library panel (Ctrl+L), then chose a sound in the "Library - Sounds" and drag it in the main Library panel.
    - Or you can import audio files from you computer, with File -> Import -> Import to Library.
    Library Sounds
    - You can test the sounds in the "Library - Sounds" by clicking on them, then click the "Play" button.
  2. Now we add the sound in Timeline. Click the first keyframe, then in the Properties panel, in the Sound sub-menu, click the Name option list, and then choose the included sound.
    - Press "Ctrl+Enter" to test the presentation.
  3. Change the Sync, Effect and Repeat properties and press "Ctrl+Enter" to understand their effects.

To stop a sound:
  1. In timeline, click on the frame in which you want to stop the sound.
    - If it is a Static frame, you must convert it in a keyframe (or Blank Keyframe), from Modify -> Timeline -> Convert to Keyframes (or "Convert to Blank Keyframes").
  2. In the Properties panel, in the Sound sub-menu, click the Sync option list, and choose Stop.

Effect Settings

The Properties panel provides some effects you can apply to the volume of a selected sound. The drop-down list next to Effect includes effects such as "Fade In", "Fade Out", "Fade Left to Right", and "Fade Right to Left". To customize these settings further, you can either select Custom from the list or click the Edit button (next to drop-down list) to access the ""Edit Envelope" dialog box, which is shown in the image below.
Edit Envelope window

Adding sound to Motion Tween

The frames in a Motion Tween don't have in their Properties panel an option to add sounds.
If you want to include a sound in a Motion Tween animation, you must create a new Layer and add the sound in the frames of that Layer.
These are the steps to add sound to a motion tween animation:
  1. Click Insert -> Timeline -> Layer to create a new Layer
  2. In this new layer, click on the frame from which you want to begin the sound, then click Insert -> Timeline -> Blank Keyframe (or right-click and choose Insert Blank Keyframe).
  3. Now, you can use the Properties panel of this keyframe to add the sound in it.
- The sound will begin to play starting from that Blank Keyframe, along with animation. The Timeline will appear similar to the picture below.
Sound with Motion Tween
- The "Layer 1" contains the Motion tween frames, the "Layer 2" contains the sound, starting from Frame 11.

Compressing Sound

Flash has a few compression settings that would reduce the size of the SWF exported file (which contain sounds).
In the Library panel, double-click on the name of the sound (or right-click on it and choose "Properties"), Flash will open the "Sound Properties" window, with settings for the selected audio file, like in the image below. Compressing Sound
Changing the compression will also change the sound quality, Flash can't get a better quality than the original audio file, but can decrease its quality when the values from "Bit Rate" and "Quality" ​​are reduced.
- MP3 is the best type compression for a good quality / size ratio.
- The "Update" button is used to reload the sound file from its initial location.
- If a sound has 4 seconds and the FPS is 24, the sound needs 4x24 frames (96) in timeline.

Daily Test with Code Example

Which tag is used to include external CSS file in web page?
<body> <script> <link>
<link href="/templ/style.css" rel="stylesheet" type="text/css" />
Which CSS property sets the text size?
font-weight text-decoration font-size
h2 {
  font-size: 1em;
Indicate the JavaScript property that can add HTML code into an element.
text value innerHTML
document.getElementById("someID").innerHTML = "HTML content";
Click on the function that returns the number of characters of a string in PHP.
count() strlen() stristr()
$str = "http://CoursesWeb.net/";
$nr_chr = strlen($str);
echo $nr_chr;       // 22
Add sounds and audio effects in Flash

Last accessed pages

  1. Backgammon (7717)
  2. Butterfly Kyodai (21449)
  3. CSS3 transition (1047)
  4. Galactic Gems (388)
  5. Nan Bubble (130)

Popular pages this month

  1. Bubbles3 (4787)
  2. Butterfly Kyodai (3589)
  3. Zuma Deluxe (2934)
  4. Backgammon (1742)
  5. Qwop (1741)