Adding audio to the hover state of a button

Has anyone been able to accomplish this? If so, how did you do it? 

I thought it would be as simple as click "Edit States" and add the audio clip to the Hover state but that isn't the case.

I then thought maybe I needed to add a trigger that would state to play media when the button was hovered over but since the audio clip was inserted into the hover state of the button, and not on the timeline, Storyline does not recognize the audio file existing.

26 Replies
Adam Truckenmiller

Nevermind...I have figured out that you can simply add the audio to the main timeline then set a trigger to have that audio to play when the certain image/character is rolled over...Guess originally I thought if I inserted the audio on the main timeline that would automatically play the sound.

Adam Truckenmiller

Thanks Phil,

Is it ok if I have it set for "Resume Saved State"? After clicking on each button I have the buttons set to become disabled. This screen is being used as a branching scene for a quiz. The audio clips on the rollover action is just stating the character's name, that the learner will be taking a scenario type of question on.

Stephanie Schneider

What if I've already recorded that sound on a state that is activated when a button is pushed. I need to add another trigger to the button to play the sound when the state changes but do I need to export the sound that I already recorded on the state and then re-upload it in order to select it from the trigger? Basically, if I've already recorded it on the state, how can I add a trigger to play that sound once the state changes? (this sounds really confusing as I'm even typing it- hopefully this makes sense to someone)

Christine Hendrickson

Hi Stephanie,

Why not just have the trigger do the work for you? You could set it up to play the media (audio) when the state changes, you wouldn't need to apply it to the state

Here's an example of how I would set this up, with a button state changing to a custom state "Audio" when the button is clicked (I removed the "Down" state):

Stephanie Schneider

Hello and thank you for your response, 

Yes I think going forward I will do that. I was asking because I had already recorded audio for a project in different states but when I published and the states changed, the audio wouldn't play. Then I tried to add a trigger to the audio that I had already recorded but the trigger wizard didn't "see" the audio I had recorded on the state. I was trying to prevent having to export all of the sound clips on all of the states and then re-importing them and adding the trigger. 

Steve Stark

Two years later, this thread was still a value to me!

Thanks for the suggestion, Phil. I ended up having to make some other small tweaks, but probably only because of the way I have my buttons' triggers set up. Like Adam, I had the buttons on the page go to various scenes that would eventually loop back to the "parent" slide. I set triggers so that the buttons the user already clicked on would be disabled by the time they revisited the page.

Yet I was running into an issue - the "hover audio" would play on the disabled buttons even though the user wasn't hovering over them. (They shouldn't play any audio when they were hovering over a disabled button at all.)

Using layers helped fix the issue. Here's what I did specifically:

  1. Create a layer for the button you want a sound to play when it is hovered over. Have the sound file on the timeline of this layer.
  2. Change the slide layer properties to "Reset to initial state." This means the sound would replay from the top every time the button was hovered over, and the sound would never "run out."
  3. On the base layer, put a trigger on the button to show the new layer when it is hovered over.
  4. On the button layer, add a trigger to Stop media when timeline starts under the condition that the button is equal to visited. (If you were like me then you got your buttons to change to a disabled state once they equaled a visited state. Otherwise I imagine you can make this say when the button is "equal to disabled.")

An voilà! The sound will play when the button is hovered over, but will never play when the button is in a disabled state.

I hope my steps help anyone seeking a resolution to their issue!

Ladd Skelly

I am basically trying to add a click sound to each of the four buttons while in Slide Master. Each button has three states, normal, hover and selected. I would like to hear the sound under each state. I am presently adding a trigger to the normal state, but having no luck in hearing the sound. See image. What am I doing wrong? I appreciate any help. Thanks. 

Steve Stark

Ladd - your triggers are out of order. It is set to go to slide 1.5 before the sound plays, which is why you aren't hearing it.

I would try this:

On the Menu button:
Play media
 Audio 1 - "click.mp3"
When the user clicks

On Audio 1 - "click.mp3"
Jump to 1.5 CIMS Dashboards
When the media completes

This way the slide will not advance until the sound completes. Know that this means you will only hear the sound when the button is clicked on, not when it is hovered over.

Hope this helps!

Steve Stark

If you're wanting the other buttons to go to different slides, then they'll need a different sound associated with them. Since you probably want to use the same "click" sound on all buttons, you'll just need to duplicate the sound layer (or upload the sound again).

See my screenshot below for an example. I suggest renaming the sound files from "Audio 1," "Audio 2," etc., to be more descriptive to the button it's tied to.

There might be a less tedious way to do this - if anyone knows, please share! Otherwise you should be able to copy/paste the buttons on the rest of the slides as needed.

Leslie McKerchie

Hi Paul! I'm not sure if Steve is still subscribed here, but you are welcome to reach out to the user directly via the 'Contact Me' option on the user profile if needed.

If you select the trigger you want to copy, CTRL-C to copy, then go to the left hand pane where your slides are listed to select multiple slides by holding the SHIFT key down and clicking on the slides you want to copy to. Press 'CTRL-V then it will copy that trigger to all the slides you have selected.

Clingendael Academy

Thanks Leslie! My question would pertain more to the idea of a quick fix to attach a `click` sound to all clicking actions in a module.

Right now I´m going through the process of attaching a specific audio file to individual triggers that correspond to individual objects, after which I have to adjust link triggers to correspond the specific audio trigger files that correspond to the same object. Seeing as my project contains more than 130 slides with dozens of layers and thousands of objects, this will take me days.

Michael Griffin

An old thread (and perhaps Storyline has evolved since the earlier posts), but I wanted to share my approach in case it's useful for anyone. 

All I wanted to do is to add a click sound to each of the buttons on a page.  Each of my buttons has a Hover and Down state.  I set up a single slide trigger as shown in the image.  The Action (Play Media) plays the Click1 sound file when the State of Any of the buttons are Down.

This single trigger plays the click sound despite other triggers being activated by the buttons.  Seems to work like a charm.  (Note: My sound file is only 0.1 sec long. Not sure what would happen with longer audio files.)

Trigger Screenshot

Joy Visscher

Hi everyone,

I want to make a slide with persons on it. When the user hovers over a person, a short audio introduction is played. I got this to work. But the initial audio keeps playing when i hover over a different person on the slide or just move my mouse. I want the audio to stop playing when the user moves their mouse to a different person or on something else on the slide. Does anyone know how to build this in articulate storyline 360?

Thanks!

Ren Gomez

Hi Joy,

Excellent question! You can build this by putting your audio files in separate layers, then in your base layer, create Show Layer triggers when the mouse hovers over a character.

This way, the audio will automatically stop playing when your mouse hovers away from the character. I've attached a sample .story file for you to try. Let me know if this helps!