• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 5. Using Sound > Adding Sounds to Buttons

Adding Sounds to Buttons

Adding sounds to buttons is similar to adding sounds to the timeline. By adding a keyframe and inserting the sound into that state of the button, you can place a sound in any of the three active states of the button: Up, Over, and Down. In the following exercise, you will add a sound to the Reservations button that you created in Lesson 4.

1.
Open the Reservations Button symbol in neptune22.fla in symbol-editing mode. Name the existing layer Graphics, and add a layer named Sounds.

The simplest way to open a symbol in symbol-editing mode is to double-click the symbol's icon in the library. (You must click the icon, not the name; double-clicking the name just highlights it.) Another method is to select the symbol's name in the library and then choose Edit from the Library window's Options menu. Or you can choose Edit > Edit Symbols and then select the symbol in the library.

2.
In the timeline, click Over, and insert a keyframe.

Clicking Over in the timeline selects the Over state and lets you add a sound that plays only when the mouse is over the button.

3.
With the keyframe that you just added selected, open sounds.fla in the Lesson05/Assets folder as a library. Locate bubble.mp3 in the library, and drag it onto the stage.

This sound is the one you will hear when the mouse is over the bubble. If you'd like to test the sound, click the play button in the top-right corner of the Library window.

4.
In the Sound layer, select the Over state, and open the Sound panel. From the Sync pop-up menu, choose Event.

Remember that because event sounds play each time they are triggered, they can overlap. Each time you move the mouse over this button, the sound plays.

5.
Choose Edit > Edit Movie. When Flash switches to movie-editing mode, choose Control > Enable Simple Buttons, and move the mouse over the instance of the Reservations Button symbol on the stage.

If you move the mouse over the button once, you hear the sound once. If you keep moving the mouse back and forth over the button, the sound starts to overlap, because it keeps getting triggered.

6.
Open the Reservations Button symbol in symbol-editing mode, and change the Sync of the sound in the Over state to Start. Return to movie-editing mode, and move the mouse over the button.

Sounds that have a sync setting of Start play all the way through when they are first triggered. If a sound of this type is triggered again before it finishes playing, it won't play. So you can keep moving the mouse back and forth over the button, but the sound will not overlap.

7.
Save your movie in the MyWork folder as neptune23.fla.

Working with sounds in Flash has been fairly painless so far. Now you're going to get into something more complicated: customizing sound effects.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint