Flash WorkshopBy now you'd better be pretty impressed with Flash. If you aren't, perhaps you haven't read my previous articles about easy animation and shape tweens. If you have read these articles and you're just not buying into this Flash hoo ha, then sit back and open your ears.

 

That's right. Flash can deliver a veritable symphony of music and sounds to delight, amaze, and possibly annoy your viewers. So once again, prepare to be amazed and dazzled, but save room for good judgement lest you send your viewers screaming with Queen's Flash! Ah-haaaaaa.......

Flash can import WAV or AIFF audio files. If you have sound files in a different format, you can most likely convert them to a format Flash can read. The last section of this article tells you where to find free sound effects and how to convert them.

 

Before importing sounds and music into your movie, you should consider file size and the length of your clip. Though Flash has some ability to edit sounds, you are better off importing a sound that is ready to play.

 

The size of your sound file is determined by length, sample rate, channels (stereo or mono), and bit depth (seconds of audio x sample rate in hertz x number of channels x (bit depth / 8) = file size).

 

 

 

As all of these factors affect the sound's file size and quality, so you will need to find a happy balance. As Flash will compress the audio files when it exports your movie, you are better off using the highest quality file possible-- 16 bit, 44.1 kHz is ideal.

Sound can enhance your Flash movies in a number of ways. Add background music for ambiance, assign sounds to events such as the push of a button, or give your characters voices. My project began a bit backwards, as I chose my sounds before I had an idea for a movie. I happened to like a car screech, a laser gun, bubbles, and a cow's moo. Together these sounds might not groove so well. So I decided to have each sound come out of the aforementioned screeching car's trunk. Now that makes sense.

 

I like to jump head first into a project creating images, sounds, and order as I go. Though the results might display a bit of spontaneity, such disorganization can make your Flash project a nightmare. So in a proper "do as I say" tone, I am telling you to plan your movie first. Create your art, sound, and storyboard, tuck them all in their cute little folders and then start your project.

 

Click on the Play button to the right and then hold the mouse button down over each object to hear the sounds.

 

I used sound in two different ways for this movie. The first sound synchs with an object that makes the sound-- the screeching car, the floating objects. The second type of sound only happens when an event occurs-- an object is clicked.

 

Decide how you want to use your sound, then read on to find out how to do it.

These steps will teach you how to assign a sound to an animation. You can then tweak the steps to make your own noisy movie.

 

 

 

I tweened the car so that it moved across the screen. Read the tween article if you don't yet know how to do this. Now add a layer above the car layer and enter a keyframe in frame ten. Select the sound from the library and drag it to the work area. As it is just sound, you won't see anything on the work area, but you will notice a small line in the frame of the timeline.

 

Select the first frame and choose Modify, Frame. Click on the Sounds tab. You will see two boxes with wavy lines. These are the images of your sound. You can edit a few things about your sound such as in and out points, fades, and volume. There are two sliders in between the two pictures that determine the in and out points. They are sort of hard to see, but try clicking and dragging them to edit your sound. You can then press the little play button on the bottom to hear the results.

 

On the right, choose a type of synchronization. You have four options: event, start, stop, and stream.

 

 

You can also play with the effects to make your sound fade in or out, or create a custom effect.

When you click on one of the objects in my movie, it makes a sound. This sound is assigned to the object (which is really a button) and requires no extra work in the timeline itself. Here is how it is done:

 

 

Any sound files brought into Flash will greatly increase the file size. My original movie was only around 10K, but when I added four short, simple sounds, the size crept up to 46K. When exporting your Flash movie, you will need to find a happy middle ground between file size and audio quality. Decide which is more important for your audience: download time or quality.

 

Choose File, Publish Settings, and click on the Flash tab. Three publish settings are available: Audio Stream, Audio Event, and Override Sound Settings.

You can further customize your settings by pressing the Set button next to Audio Stream and Audio Event. Disable causes the sound to not be exported with the movie. ADPCM allows you to choose: Convert Stereo to Mono (combines sound into one channel), Sample Rate, or ADPCM Bits (the higher the bit number, the better the quality).

 

If you choose MP3, you may also convert stereo to mono, change the bit rate, and choose the quality settings. Increasing the bit rate in the MP3 audio compression scheme will not greatly increase file size. For quality, choose fast for the Interent, and best for CD-ROMs. The Flash 4 Bible recommends you choose MP3 at 64Kbps for moderate-to-good sound quality.

 

For more control over your sound's compression, try customizing the sound's settings in the Flash Library. This is particularly useful if you have sounds that can have different qualities. Double-click on the sound you want to edit in the Library. In the Sound Properties box, you will see a section called Export Settings. Here you can tweak individual sound files. The Sound Properties box also allows you to update changed sounds, import new files, preview the export quality of your sound, and also offers a Help button.

In my search for free sound effects, I stumbled across Partners in Rhyme. Not only did I pause to chuckle at the name, but I found a ton of weird sound effects (thus the bubble, car, cow combo). Many of the files I found had an .au extension that won't work in Flash. So I downloaded a program called GoldWave. You can open all sorts of sound files in GoldWave, tweak them, then save them as WAVs. Voilą-- instant sound effects.

 

I did have a small problem importing the cow moo into Flash. In GoldWave, the cow sounded perky as can be. But when I brought the sound into Flash, the poor cow sounded ready to keel over. This is because Flash can import sample rates of 11 kHz, 22 kHz, or 44 kHz, but the cow was sampled at only 5 kHz. So I resampled the sound in GoldWave and re-imported it into Flash, creating a much happier cow.

Home Information Page HTML Lessons Java Script Lessons