I've added audio sound efx to the visited states of objects on a slide. The sound efx plays when the user clicks the object. That all works fine. The problem comes when the user leaves the slide and then comes back to it, all the audio from each visited state plays all at once, creating quite a cacophony.
I've tried having the sound on a disabled state and that works the same as the visited state.
What should I do to disable the sound on the visited states once the user has clicked and heard it once?
It would be more triggers but could the sound be triggered on click if state not = to visited rather than in a state? I would think then it would only play on the first click.
One way to do it is by using variables and assigning them to your buttons.
Assign a True/False variable to each sound effect (in this example, the vars are SoundEffect1 and SoundEffect2) with a default value of false.
Add a trigger to your buttons to adjust the Variable to True when the button is clicked. When you click Button 1, the variable SoundEffect1 automatically goes from False to True. Button 2 makes var SoundEffect2 = true.
Add a trigger at the slide level that says "Stop Media" on your sound effect when the variables are true.
I've attached a sample .story file so you can see how I did this...
Interesting behavior that it only replays the sound on return to the original slide if it didn't have a chance to complete on its own. I didn't know it did that. Your solution fixes that nicely.
5 Replies
Urica;
It would be more triggers but could the sound be triggered on click if state not = to visited rather than in a state? I would think then it would only play on the first click.
Tim
Urica,
One way to do it is by using variables and assigning them to your buttons.
I've attached a sample .story file so you can see how I did this...
Thanks Nicole;
Interesting behavior that it only replays the sound on return to the original slide if it didn't have a chance to complete on its own. I didn't know it did that. Your solution fixes that nicely.
Tim
Thanks Nicole and Tim. I will do that. I've used true/false variables before, but didn't think to use it in this situation.
Best,
Urica
It worked. Thanks so much Nicole!!
U.
This discussion is closed. You can start a new discussion or contact Articulate Support.