July 29, 2011
Creating Custom Mute/Unmute Audio Button using Advanced Actions and Variables
Comments
(11)
July 29, 2011
Creating Custom Mute/Unmute Audio Button using Advanced Actions and Variables
Followers: 0 people
(11)

Scenario: Many times having a custom button to mute or unmute the sound being played helps a lot. In this post we will discuss how to do that step-by-step. BTW, there is mute/unmute audio button is available in the Playbar as well. This one is to have just this button when we don’t want to have the complete Playbar. See the following demonstration to know what I’m referring to.

Let’s see how to do achieve this…

Step 1: First step is to decide on a cool graphic icon for the mute sound and unmute sound action. I used Adobe Photoshop to create 2 icons and imported them into Captivate. I’ve also inserted a Click box. The logic here is, the Advanced Action which does the mute/unmute the sound is associated to the Click Box. Then why do we need the two icons? That’s the interesting part here… based on the action we will show/hide these icons. I’ve also added a background Audio which will be controlled by the button we are going to create. Following demonstration talks about the initial setup.

Step 2: Now we will create the advanced action to mute or unmute the sound. We will create a variable ‘soundPlaying’ and associate 0 or 1 to that. With the help of a conditional action we will decide whether to mute the sound or unmute it. There is a system variable called ‘cpCmdMute’ which is used for muting or unmuting the sound. Assigning cpCmdMute to 1 mutes the sound and 0 would unmute it. Following demonstration details out these steps.

Step 3: Now that we have successfully created the Advanced Action, let’s associate this to the Click Box we have placed above the icons. Also, we will add additional actions to Show/Hide the icons based the state of Audio. If the Audio is playing, the icon would be ‘unmute’ icon. And if the Audio is not playing, it would show the mute icon. Following demonstration outlines the details related to that.

Hope this post is useful for you!

11 Comments
2021-12-08 06:51:05
2021-12-08 06:51:05

helped me out a lot

Like
2021-12-08 06:50:44
2021-12-08 06:50:44

thanks for the share

Like
2018-01-14 16:37:40
2018-01-14 16:37:40

I can’t see any videos like Tara McDonald. This is really frustrating. What code was used?

Like
2017-10-17 13:14:33
2017-10-17 13:14:33

None of the videos are downloading. Can future explanations have examples of the text in the advanced action?

Like
2016-04-20 22:14:00
2016-04-20 22:14:00

Hi,

Followed the above instructions. Works fine on the first slide, but on any further slides in the project, the mute and unmute function still works, but the image no longer changes.. any ideas?

Like
2013-11-13 06:34:00
2013-11-13 06:34:00

UH OH – The button works flawlessly the first time I preview it. But I preview it again and it mutes the first time but every time thereafter all I get is a click sound. I tried publishing but I get the same results.

Like
2013-11-09 23:56:00
2013-11-09 23:56:00

Outstanding!
Extremely Helpful.
Thanks for all your hard work 🙂

Like
2013-04-01 23:51:00
2013-04-01 23:51:00

I seem to be having some problems with this in Captivate 6.
Two issues specifically.
1 I cant put a clickbox on any sides that include a question
2 The show/hide does not work on slides that have interaction widgets on them
and as my module is being built chiefly out of question slides and interactions this is a problem for me!
Any ideas?

Like
2012-12-11 18:14:00
2012-12-11 18:14:00

Hi there, this works great thanks, I was wondering if it could be amended to have the slide audio paused instead of muted, that way when you clicked to hear again it would play from where you left off?

Like
2012-07-13 00:47:00
2012-07-13 00:47:00

I tried this an it works however I the audio does not play upon slide entry which is what I want. Right now after following this everything is muted until the user clicks the unmute icon. I can not figure out how to reverse this.

Like
2011-07-30 03:45:00
2011-07-30 03:45:00

great! creating custom muteunmute audio button using advanced

Like
Add Comment