Creating an audio on/off button

Nov 17, 2014

Hey guys,

I'm a little stumped on a trigger... I need to have the option to turn audio on or off throughout an entire course, but can't for the life of me get it to work.

I'm working in SL2 and have added a couple of sample slides to show my on/off selection page.

Any help would be greatly appreciated!
Thanks in advance :D

7 Replies
Wendy Farmer

Hi Beansprout,

I normally have a speaker icon on each screen that the user can turn on / off.  I have done this on your second slide to show you.  I created a 'selected' state so that when the user clicks the icon it plays, when they click it again it pauses.

Not sure if this works for you but that's they only way I know how to do it.

You can change the image of the speaker icon to show no ))) when it's toggled so the user knows if its in the on / off position.

I'm sure there will be other examples of how it can be done.

Brett Rockwood

Here's what I'd do: Keep your Audio variable as is, set to true. Set a trigger on your "Don't Play Audio" button to change the variable to false when the user clicks. Here's the trick: move your audio to a new layer and set a trigger at the beginning of the slide to show the layer with the audio on it when the timeline begins if the variable is true. (You might need to create an object offscreen before you can paste in your audio.) You just need to do this for each slide.

There might be, and probably are, better ways to do this but I think it will work.