VirtualMV/Flash12 (CS6)/Journal/Content/Adding Sound to a button

From WikiEducator
Jump to: navigation, search


VmvIcon Objectives.png

By the end of these exercises you should be able to:

  • Add sound to a button that activates when the mouse is rolled over and/or the button is pressed.

Note that some of the ideas have been covered in earlier chapters. If you have forgotten the steps look back for instructions.

Open an existing Flash document

1. Re-open jnlSound.fla

Source a sound file

2. In the Windows/Media folder on your system, choose two of the sound files that make a button like sound, and copy into your journal folder. For the following example I will use the ding.wav, notify.wav file which I will rename to btn01.wav and btn02.wav.

3. Add them to the flash movie’s library (drag them from Windows explorer into the library pane)

Note: If you want to edit sound using Audacity, you may need some plugins. A large source of plugins can be found at and

Creating a button

4. Create a new Layer called SoundBtn

With the SoundBtn layer selected

5. Add a button (Window > Common Libraries > Buttons .. choose .. drag onto stage ). I have chosen a fairly simple button (buttons circle flat – blue) as it is made up of only a few layers. You may want to choose something more spectacular!)

Your stage should resemble ...

Fla9 SoundBtn01.png

6. Close the button window.

7. Double click the button on the stage. Flash will open up the button symbol and its layers. Adding sound to the button

8. Add a new layer called Sound, then add keyframes to the Up, Over, Down and Hit columns. Your timeline should look like that shown (following)

9. On the Sound layer click on the keyframe for Over. Then use the Property inspector and select btn01.wav in the Sound drop box.

Fla9 SoundBtn02.png

10. Repeat for the Hit keyframe and select btn02.wav--AdrianLim 23:36, 22 August 2011 (EDT)

.. and that’s all there is to it….

Save, Test and Publish your document

Save, test and publish this Flash document ( jnlSound.fla )

Task: Add another button

1. Add another button with different sounds.