Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
It's important to provide users with feedback to interactions that they perform on your site. That's what I want to do with these buttons when the user rolls over a button, I want to play just a quick rollover sound effect and then also when they click, I want to play a click sound. All right, so the first thing I need to do is import those sounds. So, I am going to File > Import, and I can Import to Stage. Notice that if I do Import to Library, it's going to do that same thing as well.
I'll select rollover.wav. Again, it could be an MP3 or other sound format so that imports that file. Let's go to File > Import > Import to Stage again, and I'll select this click.wav as well and click Open. Like I just mentioned, it does import them right into the Library as you can see. There is this click sound. Let's play it. (Click, click, click) And again it's going to be fairly subtle. Then near the bottom here I have this rollover WAV, so I'll click.
(Music plays) So, that's the rollover sound that I want. All right, so my tracks are imported, those audio files, and I need to add them to these buttons. Luckily, these are all instances of the generic button, so all I need to do is just double-click on any one of them to edit it. Now, notice in my Timeline what I can do is just add a new layer, and I can rename this layer Audio.
All right, right in here for the Over state, like I just mentioned, I want to go ahead and play a track. So, I need to insert a keyframe at that point in time and on this keyframe, I want to add the appropriate audio track. So, let me open up my Library. I am going to select this rollover.wav, and I am just going to drag it right on to the Stage and notice how it adds that waveform to that Timeline. All right, I am going to select that keyframe there and I am just going to double-check my sound.
It does say rollover.wav. The Sync is set to Event so that looks really good. In next frame, again it's the same process of inserting a keyframe, and now I can go ahead and add the click.wav right here. I'll just drop that right on. I can see that waveform in there, giving me visual feedback that it actually put on that audio track in there. I can check the Sync is set to Event as well and I am good to go. So, again this was to the generic button and if I click on Scene 1, it actually again adds it to the generic button which is being used five times.
Okay, so let's go ahead and check this out. I'll go to Control > Test Movie. So, let's listen to these sound effects. (Rollover sound and clicking) All right, so that sounds pretty good. I personally think the rollover sound is kind of loud so I want to edit that. The great thing is that I don't have to go out to my actual sound file, edit it, and then reimport it.
What I can do is I can actually edit it right in Flash. So, I am going to just double-click on that generic button. Go to that Over sound. Sure enough, here's that rollover.wav and what I can do is just this Edit sound envelope icon right there, and now I can see my waveform here. All I need to do is grab this control bar, and I can go ahead and move that down so it's about halfway, sort of part of that lower quarter area right down here. That's where I will put it. So, it's only about the quarter of the way up.
Now, let's play it. (Rollover sound playing) Again, I am going to keep this really subtle. I don't want to annoy users with audio. I just want to provide some feedback so they know that they are sort of interacting with this site. Okay, that was just a quick way to edit the sound envelope. Notice that when I do go back into Edit sound envelope, what I can also do if I want it to trail out a little quicker, I can even click here and add another keyframe and adjust the audio so it trails out a little faster.
All right, let's go to Test Movie. (Music plays) Now, remember the rollover sound is going to be a lot more subtle so-- (Rollover sound plays) Just like that. So again, just providing some user feedback to their interactions that they are performing on the site. As you can tell, it does really add a nice dimension to sort of any web project you might be working on.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.