|< Day Day Up >|
Flash has great support for audio but no internal way to record or create sounds. You need to find an existing sound, have one provided for you, or use sound software to record or create your own. This simply means that in Flash, you can import sounds but you can't create them.
Two basic steps are involved in getting audio into a Flash movie. First, you need to import the sound. Then, you need to decide where and how to use it. This is similar to importing raster graphics (as you did in Hour 3, "Importing Graphics into Flash"). When you import a sound, it's stored in the Library like an imported bitmap. The sound appears in the Library where you can access all the sound's individual properties (just like bitmap items).
Flash can import digital audio in the following file formats:
The only catch is that unless you have a newer version of QuickTime installed, when running Windows, you can't import AIF or AU, and on a Macintosh, you can't import WAV. Just download and install the free QuickTime player software from www.apple.com, however, and you'll be able to import audio in any of these four formats.
People often want to know which format is best. In general, it doesn't matter. You should simply start with the best quality sound possible. Between AIF and WAV, there's no inherent quality difference. A high-quality AIF file is the same as a high-quality WAV file. The AU format is nearly always compressed at a low quality, so you can all but forget that format. MP3 files always have some compression, so ultimately those files are not best. However, when MP3s are compressed very little, their quality remains high. Plus, the MP3 might have been optimally compressed (and, as you'll see in this hour, Flash won't recompress it). There are two valid reasons to use MP3s:
MP3s don't get any worse after you bring them into Flash, but they certainly can't get any better. What's more, some MP3s aren't very good to begin with. I recommend avoiding MP3s as source files unless they're all you have or you're totally satisfied with their current quality.
You'll learn more about digital audio later this hour, in the section "Digital Audio Fundamentals." For now, it's enough to know that just four sound formats can be imported into Flash. What about songs on audio CDs? CD audio tracks aren't in WAV, AIF, AU, or MP3 format, so you can't use them directly. Luckily, however, most sound-editing software and Apple's excellent free product iTunes provides the ability to extract music from a CD and save it in WAV or AIF format. Of course, you should realize that significant copyright concerns arise when you use audio from a published CD. Plus, many CDs and digital music files you download incorporate Digital Rights Management (DRM) technology that makes them difficult or impossible to copy. (Alas, some such CDs won't even play in your CD player.)
It turns out you can usually use sound in your animation without necessarily worrying about all these details, as you'll see in the next task.
Try It Yourself: Import a Sound
The process of importing sounds into Flash is very simple. Follow these steps:
|< Day Day Up >|