Copy link to clipboard
Copied
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.
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?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Thank you. I've got it working now.
I'm not sure what you meant with your last sentence.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
I simply did it with javascript:
window.cpCmndMute = 1; //turn sound off
window.cp.show('SoundToggle2');
window.cp.hide('Tick');
window.cp.hide('SoundToggle1');
Copy link to clipboard
Copied
Would have been easier with states and shared actions. Because you could
use the same shared action everywhere, using parameter. Up to you.
Copy link to clipboard
Copied
Thanks for this solution.
One additional question, I cannot seem to find the option to mute the click sound when I use a smartshape as the button to mute the whole audio with an advanced action.
I can deselect "allow mouse click" which gets rid of the clicking sound and access it by using a keyboard short cut. But I would like to be able to click on it too.
Sorry for the trivial question...!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks! Once again I look a fool for not scrolling down far enough.
Well, live and learn...
Copy link to clipboard
Copied
No problem, Captivate has perhaps too many features?