O'Reilly logo

Flash CS4 All-in-One For Dummies® by William B. Sanders, Doug Sahlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Adding Sound to a Flash Production

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.

Importing Audio

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.

Importing Audio

To import a sound to the document library:

  1. Choose File

    Importing Audio

    The Import to Library dialog box appears (see Figure 2-1).

  2. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required