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
  • great! creating custom muteunmute audio button using advanced

  • 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.

  • James

    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?

    • Peter Biro

      Hi James, did you find a solution ? I ran into to the same problem. Thanks

      • jack heeney

        HAS ANYONE SOLVED THIS PROBLEM YET????

      • jack heeney

        so far i have found out that it doesnt work because the icons on the next slide have changed there name, for example mute may have changed to mute_2, mute_3 and so on.. This means that you must have specific advanced actions on each slide to make this work. Another problem with this is that if you are muted from the previous slide when you arrive on the new slide the mute button should appear muted still as the audio isnt playing but it shows as unmuted with no audio playing…

        As of right now i have no solution to this problem still.

  • Loading
  • Categories

  • Archives

  • Authors

  • Recent Comments

    • Darrell McElmurry: I’m having trouble seeing the text captions using Captive Studio 8 to create a multiple...
    • Alrazy: same here. no e-commerce functionality; you will have to sue a separate solution for registration and the...
    • Alrazy: Great product, but it does not provide an end-to-end solution – there is no e-commerce functionality;...
    • Andrew Gould: Same here…
    • jack heeney: You’re wrong and there isnt one… hand code your own learning environment if you want freedom...
  • Captivate & eLearning Videos

    Subscribe to Adobe eLearning on YouTube.

    Check out the latest eLearning Videos on AdobeTV