Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Adding audio to buttons

From: Creating a Portfolio Web Site Using Flash CS4 Professional

Video: Adding audio to buttons

Audio is a great way to bring your site to life and add confirmation on tasks, such as adding rollover and click sounds on buttons and that's what I'd like to do this main menu is add some audio confirmation. So when you roll over any one of these, you are going to hear like a highlight sound and when you click on it, you are going to hear like a button click sound. So the first thing I need to do is go to File and import my sound. I am just going to import to my library and in the sound folder, which happens to be in the Assets folder, go to sound and what I want to do is I want to add the rollover.mp3 and the clickSwoosh.mp3, but notice I can actually import all sorts of different sound formats.

Adding audio to buttons

Audio is a great way to bring your site to life and add confirmation on tasks, such as adding rollover and click sounds on buttons and that's what I'd like to do this main menu is add some audio confirmation. So when you roll over any one of these, you are going to hear like a highlight sound and when you click on it, you are going to hear like a button click sound. So the first thing I need to do is go to File and import my sound. I am just going to import to my library and in the sound folder, which happens to be in the Assets folder, go to sound and what I want to do is I want to add the rollover.mp3 and the clickSwoosh.mp3, but notice I can actually import all sorts of different sound formats.

So just take a look at this list if you ever want to determine what sound can be imported. Of course, MP3 is really popular, so that's what I'm using. Okay, Import to Library and if I minimize the Properties panel, right in there, you'll see the clickSwoosh and you'll see that rollover.mp3. All right. I want to add it to all these buttons including this Home button. So I am going to first double-click to enter inside of the content movie clip and then I am going to double-click again to enter into this Home button.

So notice right up here at the top in the timeline, I have my various Over, Down and Hit states. So what I need to do is I need to create a new layer by clicking the New layer button and I am just going to type in Sound. So this is where I want to add my audio and I want to add my audio right in this Over frame. So what I need to do is I need to right click and I need to insert a keyframe. So at this point in the state of the button, I want to add that audio track. Okay, so with that frame selected, I am going to open up the Properties panel and right underneath Sound, you might need to twirl it down if you don't see it, I can select the name.

So here it is going to list out all of the audio tracks that I have imported. Now since this is the Over state, I am going to select rollover.mp3. Now I am just going to confirm that the Sync is Event. I can also use Start. The last thing you want to use is Stream because Stream will not play the audio track for you, in this particular case. So I am just going to leave that on Event. That's looking pretty good. Maybe for the Down state, I will do the same thing. I am going to insert a keyframe and on that keyframe, If I go over to Properties, I can select clickSwoosh, because that is going to be on the Down state.

It is kind of a click sound with a slight swoosh since this interface turns. All right. Sync is set to Event and we are looking pretty good. All right. With that done, I am going to go to Control>Test Movie and if I click on it, you can hear the sound and when I roll over it, you can hear it activates. So let me rollover it again. So you could hear those two sounds.

Now you can play with the volume if you want to as well. It is just a fine balance as far as getting the sound that you want. But luckily, if you ever want to edit any of this audio, you can always come in here and with that frame selected where the audio is, you can always select this Pencil icon, which allows you to edit the sound envelope. So here you can raise or lower the volume of that particular sound. So, all right it is looking good so far. So, what I want to do is I want to really add those same sounds to other buttons.

So all I am going to do is just go ahead and select those three frames and right-click and Copy Frames. Now if go back to the content movie clip, I can double-click on the About movie clip and it's the same process of adding a layer called Sound and then right in here, I can go ahead and Paste Frames, just like that. So I am just going to repeat this process by going into that particular button, creating a new layer, selecting all of those frames and pasting them in.

And the last one, I am going to double- click on portfolio, create a new layer, select all those frames. Notice when I paste it in, it is actually going to change the name of that layer as well. Paste Frames, it changes it to sound. I like how it does that. Let's go to Control>Test Movie. Again, I am just going to be quiet for a second and so you can listen to these various button sounds. (Button sounds) Looks like everything is working. This does get hung up a little bit and I am going to talk about that later how to kind of take care of the little transitions that might get stuck.

But in general, you can hear all the audio and I can get as elaborate as I want with the audio, but I like how I am able to integrate audio into the user experience to give the users confirmation as to what they are doing.

Show transcript

This video is part of

Image for Creating a Portfolio Web Site Using Flash CS4 Professional
 
Expand all | Collapse all
  1. 1m 41s
    1. Welcome
      1m 7s
    2. Using the exercise files
      34s
  2. 24m 1s
    1. Understanding web design
      2m 44s
    2. Creating a Flash file
      3m 18s
    3. Importing a design from Photoshop
      7m 45s
    4. Optimizing the design
      10m 14s
  3. 13m 59s
    1. Dynamically loading an image
      3m 37s
    2. Loading random images
      10m 22s
  4. 47m 38s
    1. Creating menu buttons
      8m 18s
    2. Adding functionality to buttons
      8m 56s
    3. Adding navigation
      9m 45s
    4. Creating transitions
      12m 0s
    5. Simplifying code
      8m 39s
  5. 26m 11s
    1. Creating web site sections
      7m 41s
    2. Dynamically loading sections
      11m 7s
    3. Linking to web sites and email addresses
      7m 23s
  6. 29m 18s
    1. Setting up a portfolio
      12m 31s
    2. Adding functionality to thumbnails
      10m 10s
    3. Allowing for unlimited thumbnails
      6m 37s
  7. 41m 17s
    1. Benefits of using XML
      4m 42s
    2. Loading XML content
      4m 34s
    3. Sorting XML content
      7m 32s
    4. Displaying XML content
      7m 35s
    5. Using XML to create thumbnails
      8m 41s
    6. Displaying content with thumbnails
      8m 13s
  8. 25m 59s
    1. Creating and importing video
      9m 47s
    2. Adding a Full Screen button
      4m 15s
    3. Creating custom video controls
      4m 50s
    4. Adding functionality to video thumbnails
      7m 7s
  9. 9m 12s
    1. Adding audio to buttons
      5m 30s
    2. Adding audio to dynamically created buttons
      3m 42s
  10. 21m 19s
    1. Applying professional transitions
      9m 26s
    2. Creating a preloader
      8m 56s
    3. Publishing a web site
      2m 57s
  11. 3m 15s
    1. Reviewing the "corporate" Flash site
      1m 40s
    2. Reviewing the "artistic" Flash site
      1m 35s
  12. 12s
    1. Goodbye
      12s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a Portfolio Web Site Using Flash CS4 Professional.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.