Monday, February 9, 2015

Lab 2: Adding sound into the mix

Today we went over how to add sounds to the buttons you're creating for Lab 2. Simple sounds, like a beep or ping, add an addition layer of user feedback to a button. We attach sounds to the "Down" stage of a button to let the user know their click was successful (adding sound to the "Hit" doesn't work well as the action happens so quickly -- the sound may seem to play after the button has completed its action). 

Fortunately, adding sounds to buttons is simple. I'll highlight the steps here. 

1. Get the sounds file. For this lab, I've assembled 18 basic wav files that work well for buttons. The sounds are in a folder on Blackboard. Download the file, unzip (if needed) and then "Import to Library" the whole lot. To hear what the sounds "sound" like, double click on the icon for the sound in the Library. In the pop-up window, there is a Test button on the right. Click it to hear the sound. Use the same sound for each instance of one button. If you wish to use a custom sound, that is fine. Just make sure it is short in length. We will do more elaborate sound additions later this semester (there is no requirement to go beyond the sounds provided for Lab 2A).

2. Attaching the sound to the button is done in the editing mode. Select the instance of the button on the stage and double-click to jump into the 4 button states. Click on the frame for "Down" then go to the Library and drag the icon for the sound onto the Stage. In class I said you have to drop it on top of the button, but anywhere on the stage works. Don't drag the sound icon to the keyframe...it won't attach there. How do you know if it worked? In the keyframe for the Down, you will see a small blue horizontal line (it is actually a small histogram of the sound). To test, leave the editing mode by clicking on Scene 1 near the top, turn on Enable Simple Buttons from the Control menu, and try clicking on the button. Nice thing is that it will beep even if there is no action on the button. Apply the same sound to all weeks on the timeline. 

3. Using the same technique, add sounds to the forward and backward buttons. 

If you are doing this step in a campus computer lab, you may want to bring along some headphones so you can verify it all works. 

If you run into any issues, please let me know via email. Feel free to attach the .fla file to your email so I can look into the issue. 

No comments:

Post a Comment