Flash - Sound
Free Flash Tutorial
In this tutorial you will learn how to add sound to your Flash Movie. This tutorial explains how to Import sound files into your Flash movie and then looks at the two different ways in which Flash handles sound: Event and Streamed sound. There is an explanation of both sound types and practical instructions of how to use each of these in your Flash Movies.
Importing Sound into your Flash Movie
Flash comes with a small Library of sounds that you can use. They are the type of sounds that you would attach to a button so that when the button is clicked you also hear a 'click'. To access the sounds:
Go to: Window > Common Libraries > Sounds
This opens a panel with a list of sounds:
Common Sound Library
To Listen to the sounds:
There are a number of ways to get a sound from the common Library into your Movie.
A sound file in the movie Library after it has been dragged from one library into the other.
Note: You cannot use the sound unless it is in your own movie Library.
Another way of getting a sound file into your movie is to drag it from the Common Library directly onto the Stage. Even though you drag onto the Stage you will find the sound in the time line!
A sound which has been dragged onto the Stage ends up in the TImeline.
Note: Once you dragged a sound onto the Stage you will find that it is in your own movie library. It will stay in your library even if you remove the sound from the timeline.
Importing an External Sound File
You cannot import any sound, it can only be certain file formats:
If QuickTime 4 (or later) is installed on your system, you can also import these:
To import a sound file into Flash go to either:
File > Import or
File > Import to Library
Browse to where your file is located.
Select a file and click: Open
It does not matter which Import method you use as either way the file ends up in your library.
Event or Streamed Sound
An event sound is one which plays to the end of the sound file no matter what else is happening in your Flash movie. That means that once it starts to play it cannot be turned off! For this reason event sounds are usually short. The most common use for an event sound is to attach it to a button. When you click the button it makes a sound - it's a bit like a door bell except it is a button bell.
An event sound must be downloaded before it will play. This is important because sound files can be very large. This is another reason why event sounds tend to be short. Remember that once a particular sound has been used once, it can be used again and again without having to re-download. Therefore it is better (in download terms) to have a few sounds attached to many buttons than every button have it's own unique sound.
If somebody clicks on a button that has a sound attached and the sound has not yet downloaded the button will still work. It will just be silent.
Streamed sound does not need to be downloaded to play. It downloads and plays simultaneously. If you have sounds that are more than a few seconds long you should used streamed sound. The disadvantage is that on a slow Internet connection the sound/music may be of poor quality. You either have to make sure that the sound is not played until the entire file has downloaded or accept that the quality may not brilliant on all machines.
Cross Ref: One way to ensure that a sound file has completely downloaded is to use a preloader. See tutorial: Intermediate - Preloader
Steamed sound can also be switched on and off. All sounds go in the Timeline but a streamed sound can only be heard if the Timeline is being played. If you stop the movie from being played, the sound will stop. Also if you go to a different section of the movie, like a new scene, the sound will also stop playing.
141023 visitors to this page since Jan 04
Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend: Click here
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.