Assigning a Sound to a Button Flash

The experience of interactivity is enhanced by the addition of subtle effects. The addition of sounds to correspond with the various states of a button is perhaps the most obvious example. Although this effect can be abused, it’s hard to overuse an effect that delivers such meaningful user feedback. Here, we show how different sounds can be added to both the Over (mouseover) and the Down (click) states of a button.

Because buttons are stored in the Library, and because only instances of a button are deployed within the Flash movie, sounds that are assigned to a button work for all instances of that button. However, if different sounds are required for different buttons, then a new button symbol must be created. You can create a new button symbol from the same graphic symbols as the previous button (provided it was built out of symbols) or duplicate it in the Library using the Duplicate command on the Library’s Option menu.

To add a sound to the Down state of a Flash button:

  1. From the Common Library, choose a button to which you want to add sound effects. Open it for editing by either double-clicking it, or by choosing Edit from the Library Options menu. Both methods invoke the Symbol Editing mode.
  2. Add a new layer to the button’s timeline, label the new layer Sound, and then add keyframes to this layer in the Over and Down columns. Your timeline should look similar to below.
  3. The timeline for your button should resemble this timeline.

    timeline for your button should resemble this timeline.

  4. Next, select the frame of the button state where you want to add a sound for interactive feedback (such as a clicking sound for the down state), and then access the Sound Panel by doing one of the following: (a) right-click/Ctrl+click the selected frame, choose Panels from the ensuing contextual pop-up, and then choose Sound; or (b) proceed from the menu with Window➪Panels➪ Sound. An alternative method (with the frame selected) is to simply drag the sound from the Library and onto the stage. You should now have the new Flash 5 Sound Panel open, as shown below.
  5. The new Flash 5 Sound Panel.

    new Flash 5 Sound Panel.

  6. Choose the sound clip that you want to use from the Sound drop-down menu. This menu lists all of the sounds that have been imported and that are available in the Library of the current movie.
  7. The next step is to use the Sync drop-down menu to choose how you want the sound to play. For this lesson, simply use the default, which is the Event option. We defer our exploration of the other options in the Sync pop-up for a later section.

You have now added a sound to your button state. Remember, you’re still in Symbol Editing mode, so to test the button, return to the movie editor either by clicking the scene tab at the upper-left of the timeline or by pressing Ctrl+E (Command+E). From the movie editor, choose Control➪Enable Simple Buttons, or Control➪Test Scene.

To add a sound to the Over state of a Flash button, simply retrace the previous steps, referencing the Over state of the button wherever appropriate. Remember that different sounds can be assigned to the Over, Down, and Hit states of a button.

Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Flash Topics