Disable audio after the state has been visited


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?



5 Replies
Nicole Legault


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