|
Supported Formats:
Following file formats are supported by flash for sound files: WAV (Windows only), AIFF (Macintosh only) and MP3 (Windows or Macintosh)
If QuickTime 4 or later is installed on system, these additional sound formats can be imported as well
AIFF (Windows or Macintosh), Sound Designer II (Macintosh only), Sound Only QuickTime Movies (Windows or Macintosh), Sun AU (Windows or Macintosh), System 7 Sounds (Macintosh only), WAV (Windows or Macintosh)
Importing Sound:
Sound file can be used once it is imported into document’s library, Select:
File > Import > Import to Library
In the Import dialog box, locate and open the desired sound file, selected file will be added in Library. Open library panel if not already opened (Window > Library)
Fig. 1 - sound file added into library
Adding Sound to a Document:
Once sound file is in library, we can apply this sound to current movie by a simple drag and drop. Click on any frame in default layer inn Timeline.
Then simply drag the sound from the Library panel onto the Stage, sound is added to the current selected layer. This is indicated by a sound wave representation running across this layer in middle.
Fig. 2 - sound applied to the selected layer
Tip: it is recommended that each sound should be placed on a separate blank layer.
While keeping any frame selected in this Layer, open Properties dialogue (Window > Properties)
Fig. 3 - properties panel for a layer having sound applied
In properties Panel following options are provided that we usually manipulate. There are many advanced options as well but they are for you to explore.
Sound: this drop-down lists all Sound assets available in library for selection. Selecting any other sound file in this list will change the sound in selected layer.
Effect: this drop-down lists some default effects that you can apply to this sound. Default effects are None, Left Channel/Right Channel, Fade Left to Right, Fade Right to Left, Fade In, Fade Out and Custom.
Sync: synchronization drop-down provide following four different options Event, Start, Stop and Stream
Event: Layers having sound with event synchronization will start as soon as first frame of this layer is reached in timeline. This sound will play irrespective of current position of Timeline head, meaning they are not synchronized.
An example of an event sound is a sound that plays when a user clicks a button. 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: is the same as Event, except that if initiated again new instance won’t be initiated.
Stop: sound will not play anymore.
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.
In flash authoring environment if you drag the play head in Timeline over a Stream sound layer, it will play that sound as well.
An example of a stream sound is lips synchronization with an animation.
Repeat: this drop-down allow to either specifying number of times sound should repeat or loop infinitely. For example to loop a 20 second sound for 10 minutes, enter 30.
Tip: it is not recommended to loop a Streaming sound
Adding Sound to a Button:
Sometimes besides adding background music to your movie using above method, you might need to add a quick sound effect on a button, whenever it is clicked.
To achieve this, flash allows applying sounds inside Button type symbols as well. You can apply any sound effect using above method to any of three button states, by drilling into a button symbol.
You might have already guessed, such a sound will usually be Event sound with repeat set to 1.
Fig. 4 - sound applied to button
Exercises:
- In context of Sound properties, what is the difference between repeat and loop?
- Can sound be applied to a non empty layer?
- If frame rate of movie is 30 frames / second, and sound file’s length in seconds is 5, how many frames will be required to completely synchronize the sound?
- Can we apply two different sounds on two different states of a button?
- What will happen if a background event sound is playing in a layer, and user clicks a button with an event sound on click?
|