|In the last tutorial, you made the rollover buttons for the navigational menu of your site. Now we will import a sound clip into your Flash movie and have the sound play when the button is clicked. You can choose from the most common sound files such as WAV, AIF (AIFF), MP3 and QuickTimeR. However, sound files are large and download slowly. Therefore the size of the sound file or files you use in your Flash website will affect the time it takes the site to download to your readers browser. It is better to use simple and small sound clips such as the frog sound I used on the demo site. Another thing that you need to consider is the copyright, licensing and royalties of the sound file you plan to use. Sound files are works of art just as digital or traditional art and they are copyrighted and licensed by the artist. It is best to purchased copyright and royalty free sound files from a company you can trust. But let's get started on your Flash website. Open the .fla file into Flash.|
Step 1. Import Your Sound Clip. To import your sound clip into your Flash library, click File > Import > Import to Library. When the Import to Library dialog box opens, double click on the sound file. You will see a new icon and your sound file in the Library Panel. To preview the sound clip, click on the Play button in the Library Panel. Now we are ready to add the sound clip to your button.
Step 2. Add Sound To Home Button. Double click on the Home button in the navigational menu of your website. Flash will change to the Symbol-Edit mode.
Insert Layer Button
Step 3. Sound Layer. Let's create a new layer in the Timeline for your sound clip. We want the sound layer to be directly above the Label layer and because Flash always places the new layer above the currently active layer, click on the Label layer in the Timeline. Click the Insert Layer button and name this new layer Sound.
Step 4. Choose a Frame. You can have the sound play for any of the three frames of the button (Up, Over, Down). But since we want the sound to be played when the button is clicked, we need to associate the sound clip with the Down frame. Still on the Sound layer, click on the Down frame.
For Flash to play the sound clip, we must add a Keyframe to the Down frame. Click Insert > Timeline > KeyFrame.
Step 5. Drag and Drop. Now add an instance of the sound clip to the Down frame. Go to the Library Panel and click on the icon for the sound file and drag it over to the Home button on the Stage. You should notice the WaveForm appear in the Down frame.
Sound Layer - WaveForm
Step 6. Test The Home Button. To test the sound for the Home button, click Control > Test Movie in the Menubar. A preview version of your website will open and you can click on the Home button to hear the sound. Close the preview to return to the Flash workspace and then click on Scene 1 to exit Symbol-Edit mode.
Step 7. Save Your Flash Movie. You can now save the new additions to your movie. Click File> Save.
Note--This tutorial shows you how to add a sound clip to an existing button. However, if you plan to make several buttons from one template, as we did in the last tutorial, you would add the sound clip to the template before you use the template to create the rest of the buttons.
Macromedia Flash MX 2004 Workspace