Copy link to clipboard
Copied
Hi. I have a course that has a lot of buttons with audio included on it. The problem is: when the users want to restart the course and visit these slides, all the buttons play their sounds and action, which causes a lot of noise. Is there an Advanced Action or Javascript to completely reset the course / interactivities when clicking on a button?
Copy link to clipboard
Copied
What do you mean by 'buttons with audio included in it', please?
You can attach object audio to any object, also to buttons. But you can also trigger an audio clip with the Success action by using the Play Audio command. It is difficult to uderstand you r question. Why would all the buttons suddenly play their sound or action when revisiting the slide? Actions can only be triggered when the button is clicked.
Resetting a slide: depends on what has to be reset. If you use states, and don't check off the option to retain states, the multistate object will be reset automatically. If you made an object visible with an action, you'll have to hide it again using an action triggered with On Enter slide event.
Copy link to clipboard
Copied
The audio is attached to the object/button that gets visible by an action descripted below:
- Button 1 Action:
Show Group with video
Delay next action by *video time*
Show Button 2 (pop audio attached)
- Button 2 Action:
Show Group with video
Delay next action by *video time*
Show Button 3 (pop audio attached)
So, when user finishes the course and go to the first slide to replay the course and go to this slide, all the buttons are visible (and consequently play the audio attached to them).
Copy link to clipboard
Copied
After the slide has been played, all the audio has been made visible, so when replayed all of the audio will also be played at once.
My suggestion: separate the audio from the buttons and attach it to transparent shapes instead.
On Enter - an action makes all of the transparent shapes hidden
Each button shows the shape that contains the appropriate audio and hides all of the others
Copy link to clipboard
Copied
Did you not think about using the Play Audio command, instead of object audio? It has one big advantage: you'll never have two audio clips triggered that way playing at once. Starting a new clip with Play Audio automatially stops the previous one. Moreover just the apperance of the button will not cause audio to play.
For your first action it would be:
instead of Show Button 2 after the Delay you'll have
Show Button2
Play Audio
Advantage: even when you do not hide Button 2 On enter to reset the slide, audio will not play because it is no longer linked to the timeline and the visibility of the object.
What Dan is referrring to are what I label as 'audio objects. Before Play Audio appeared as comand that was the only way to achieve what you want. You could find some articles on my blog about that workflow.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Of course you can mute, but that means all audio will be muted. Just use the system variable cpCmndMute. At the last button of your course toggle it to 1.
It is a ptiy that you cannot edit a shared action, but if it is the same shared action for all the buttons, it would be worthwhile to do it any way. Use the shared action as template for a new shared action, doesn't take so long.
Copy link to clipboard
Copied
This mute command worked but as I have other attached audios during the project, it wasnt good at all
I will probably edit the actions as you mentioned. Thanks!
Copy link to clipboard
Copied
That is what I feared: muting is for everything. Success!