In This Chapter
Importing audio to your projects
Adding sound to your projects
Adding sound to buttons
Using ActionScript to load an external sound file or a soundtrack
It seems like every Flash movie has sound in it. Flash sites have background music playing, and buttons make noise when they're clicked, for example. If you want sound in your Flash projects, you've come to the right place. In this chapter, we show you how to import audio, add audio to keyframes, and add audio to buttons. Last but not least, we show you how to use ActionScript to load a music soundtrack.
If you want music in a Flash project, you have to import it — it's a Flash law. When you import music to a project, you can import it to the Stage or to the document library.
To import a sound to the document library:
The Import to Library dialog box appears (see Figure 2-1).
Select the file you want to import.
You can import any sound file format supported by Flash. If you don't have your sound assets organized in their own folder, you can save time by choosing All Sound Formats from the Files of Type drop-down menu. When you choose this option, only supported sound files are displayed in the dialog box. Alternatively, you can select a file format type from ...