Forum Discussion
ShawnaGigacz-47
3 years agoCommunity Member
Using JS to toggle mute audio / button change state when advancing to next slide
  I have a custom audio button on my master slide that when clicked will mute and unmute the audio using some js code I got from this forum. 
 It works just fine, except when I mute the audio and then...
JoseTansengco
3 years agoStaff
Hello Shawna,
Thanks for reaching out!
I took a look at your project file and saw that your audio icon is using the built-in 'Selected' state to show that the volume is muted. The built-in 'Selected' is a state that exists only for an object on a slide, and doesn't get carried over to a different slide. This means that when your learners navigate to a different slide, the state of the audio icon is reset.
To make the state change more permanent, try using variables to keep track of what the state of the audio icon should be. A true/false variable can help you keep track of which state the audio icon is in across all of your slides.
Related Content
- 6 days ago
 - 10 months ago
 - 7 months ago
 - 4 months ago