Sound Compression


As mentioned, sound is data intensive . To help you minimize file size , Flash offers two approaches to compression: You can either create individual compression settings for each sound or you can apply a global compression scheme. You're generally much better off setting up compression for each sound individually than letting Flash use one overall compression scheme.

By default, Flash uses MP3 16-bit mono compression. You can change this default by specifying a different compression scheme in Publish Settings. Although MP3 compression does a terrific job with keeping file sizes small, it does have some limitations of which you should be aware. The higher frequency sounds tend to get lost during heavy compression. In fact, if you've been testing your movie by publishing it, you've probably noticed that the highhats sound is kind of muddy. That's MP3 compression kicking in.

Tip

Flash 3 and earlier players do not support playback of MP3 compressed sound. If you know your audience is using one of the earlier players, you need to export your sound in ADPCM format.


To compress a single sound, you use the Sound Properties dialog box. To open it, double-click the sound icon next to it in the Library. (See Figure 13.7.)

Figure 13.7. Use the Sound Properties dialog box to set the compression for each sound in your movie.

graphics/13fig07.gif

The upper half of the Sound Properties dialog box contains information about the sound:

  • A view of the waveform (one waveform for mono sound and two for stereo)

  • The name of the file in the Library

  • The name and path of the original sound file

  • The last date the sound was updated

  • The sampling rate, bit depth, time in seconds, and size of the original file

Take a glance to the right side of the window. You'll see a series of buttons . In addition to the usual OK, Cancel, and Help button, there are the following:

  • Update. If you've updated the original sound file and you want those changes to be incorporated into your Flash movie, click Update.

  • Import. You might change your mind about using a particular sound. Want to swap in a new sound without removing the existing sound from your file? No problemjust use the Import button.

  • Test. When you start adjusting the compression for your sound, you need to test it to make sure the new compression setting is acceptable.

  • Stop. Stop the sound you're testing.

At the bottom of the Sound Properties dialog box are the current export settings for the sound. Depending on the type of compression selected, the other options vary. You can choose from four compression options: Default, ADPCM, MP3, or Raw.

Unless you have a compelling reason not to, use MP3 compression to get the highest quality and lowest file size especially for delivery of sound over the Internet. What would constitute a compelling reason not to use MP3? One reason would be if you knew your target audience was using the Flash 3 or earlier player. The earlier players don't support the playback of the MP3 format. If you're targeting those players, you need to use ADPCM compression. Unless you're not concerned about file size, you should avoid Raw compressionwhich is no compression at all.

Tip

Using stereo versus mono sound doubles your file size and few people notice the quality difference. Thus, for preprocessing, it's usually a good idea to check Convert Stereo to Mono.


If you are using MP3 compression, keep in mind that sounds with low frequencies can be compressed more than sounds with high frequencies. Higher frequencies are what tend to get dropped during compression. Thus, if you've got a sound with higher frequencies, you might want to up the bit rate for that sound.

Exercise 13.4 Compressing the Sounds in Your Soundtrack

To keep your final file size as small as possible, you need to compress your sounds as much as you can without losing too much quality. To do this, you need to compress and test, compress and test.

  1. Open sound.fla if it isn't still open. If you're starting the exercises at this point, open sound3.fla from the CD.

  2. Double-click guitar.wav in the Library to open the Sound Properties window. Right now the compression should be set to the default.

  3. Switch the compression to MP3. The preselected bit rate is 16Kbps. Test the sound. The rates you can choose range from 8Kbps160Kbps. The only rate lower than 16Kbps is 8Kbps. Select 8Kbps. Test again. There is definitely some loss of quality at 8Kbps, but it isn't too bad. Because you've set the volume for this sound to 50%, it'll probably be okay.

  4. Do the same for each sound in the file, picking the lowest bit rate at which the quality is acceptable. For some sounds you might want to increase the bit rate slightly for better quality.

  5. When you're done, check your final file (SWF) size. Depending on the compression settings you've chosen , you file size has either increased or decreased. By using MP3 compression, however, it's sure to be smaller than it would be by using any other method.

You've mixed your sound in Flash. It's obviously not a perfect editing environment, but you do have rudimentary control over your sounds. Next, take a look at how you can synchronize a spoken soundtrack to a simple animation.



Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net