July 29, 2011

Creating Custom Mute/Unmute Audio Button using Advanced Actions and Variables

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!

Posted by Vish11:56 PM
  • http://www.wedding-dress.com/ wdDress

    great! creating custom muteunmute audio button using advanced

  • http://pulse.yahoo.com/_XG6OEA2EVD4H4S4VV5FPQIER3U Xeon

    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.

  • Jules3200

    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?

  • Alan Montague

    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?

  • Al

    Outstanding!
    Extremely Helpful.
    Thanks for all your hard work :)

  • Al

    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.

  • Loading
  • Categories

  • Archives

  • Authors

  • Recent Comments

    • Lisa M. Matthews: Hi, Yes that is what my conditional action is doing. I was actually able to get this working. I had...
    • Bob: Expresso for you and me, not you and I.
    • Marie Andersson: Thanks for a blog post focusing on company related knowledge sharing. As is obvious from this...
    • Mohana: Hey Lisa I have assumed that you have used a conditional action which jumps to a slide if the entry is...
    • Dr. Pooja Jaisingh: Yes, you can convert the Submit button from Text to Image button and add your own custom button...
  • Captivate & eLearning Videos

    Subscribe to Adobe eLearning on YouTube.

    Check out the latest eLearning Videos on AdobeTV

Recently Approved