Skip to main content
May 22, 2016
Answered

Enabling/Disabling Sound (Cap 9)?

  • May 22, 2016
  • 1 reply
  • 811 views

Hello,

I know sound can be turned off once in the settings, but I would like an advanced action/javascript version for it.

At the moment, I have a square, which is situated below a tick, and I'd like it when the tick is pressed, it hides (I already do that) and disables the click sounds. Then, when the empty square is clicked, the tick shows again (I already do this) and turns the click sound back on.

http://i.imgur.com/jkdvvzW.png

If you know any methods which allow me to do this multiple times in the project with just these two objects, please teach me.

Thank you in advance.

    This topic has been closed for replies.
    Correct answer Lilybiri

    You can only mute all audio by advanced/shared actions, not just the click sounds. Muting happens by toggling the system variable cpCmndMute, which is a Boolean.

    I blogged about shared actions for toggle buttons: 1 action = 5 Toggle Buttons - Captivate blog

    You could use that action, and add the command to hide/show the tick. I have no idea how you realize it at this moment: with hide/show or with states? 

    1 reply

    Lilybiri
    LilybiriCorrect answer
    Braniac
    May 22, 2016

    You can only mute all audio by advanced/shared actions, not just the click sounds. Muting happens by toggling the system variable cpCmndMute, which is a Boolean.

    I blogged about shared actions for toggle buttons: 1 action = 5 Toggle Buttons - Captivate blog

    You could use that action, and add the command to hide/show the tick. I have no idea how you realize it at this moment: with hide/show or with states? 

    May 22, 2016

    Thank you. I've got it working now.

    I'm not sure what you meant with your last sentence.

    Lilybiri
    Braniac
    May 22, 2016

    How do you show/hide the tick? It can be done in multiple ways, and you'll have to integrate the mute command (toggling) in the action that you use to do it. Since you are on CP9, I would recommend to use states, but maybe you have preferred the old Hide/Show method?