Help with a toggle button
Nov 16, 2016
By
Anthony Goss
Hi, everyone! I have created a toggle button that plays a recording and toggles between play and pause. It works perfectly when viewing the slide for the first time, but when revisiting the slide, the toggle button switches functionality. The play button functions as the pause button and vice versa. I am attaching the Storyline file as well as a link to the interaction. The slide in question is 1.2. I would appreciate any help I can get.
Here is the link to the project:
https://360.articulate.com/review/content/b1d8dc7e-0d74-4679-bc17-ec8b3de6bb2c/review
7 Replies
Hi Anthony,
So I deleted your variable toggle play/ pause and put these two in instead:
adjust variable PlayPause =Assignment Value False User Clicks button 5
adjust variable PlayPause =Assignment Value True User Clicks button 5
Then changed your play / pause media slightly to
Play Media Audio 1 variable changes pay pause on condition that play/pause == equal to true
Pause Media Audio 1 variable changes pay pause on condition that play/pause == equal to false
Attached the file in case that doesn't make sense. Apologies if that was not what you were looking for!
Thanks,
Laura
Hi, Laura! Thanks for your help. I tested the change, and it appears that the button no longer functions at all. It does not pause the media when I click it. The state changes but the sound continues to play.
Oh sorry, works perfectly on my PC :(
Anthony, I think all you need to do with this is add a trigger that changes the button state back to "normal" when your media completes. I would probably also consider changing the value of your play/pause variable to whatever it should be (true or false) when your media is not playing.
I may have time to mock up an example later on if you think that would help, let me know.
I tried that solution, Brian, and it did not work either. It is really strange because I have the "Reset to initial state" when revisiting the slide checked on the slide properties. For some reason, it reverses the state of the button when revisiting the slide.
Actually, I did get it to work! I had another trigger to jump to same slide when timeline completed. Once I deleted this trigger and added the two parameters indicated by Brian, it worked fine.
Thanks so much for your input!
Excellent news, glad to hear you got it going! Good luck with the rest of the project, it looks like a fun one.
This discussion is closed. You can start a new discussion or contact Articulate Support.