Set up a true/false variable. Something like stopAudio. Set the default value to False.
On the slide where the audio is playing, add two triggers.
Trigger 1 - The very first slide trigger in the list
Stop media "audio file name" when the timeline starts if stopAudio is equal to True
Trigger 2 - Doesn't really matter where this one goes
Set stopAudio equal to True when the timeline ends
What happens:
The slide plays for the first time. Trigger 1 checks the stopAudio variable. It is set to False (the default). The audio plays.
At the end of the timeline, the Trigger 2 is fired and the stopAudio variable is set to True.
The next time the slide is visited, Trigger 1 checks the stopAudio variable. It sees that it's set to True. The audio is immediately stopped.
Note that this will require a different variable for every slide (stopAudio1, stopAudio2, stopAudio3 etc.) because every piece of audio needs to be stopped on an individual basis.
One other note: This will only work if the user listens to the end. If they don't, the audio will play again when they revisit the slide. If you don't care if they listen to the whole thing, just set the stopAudio variable to True when the timeline starts. Be sure that Trigger 1 remains at the top of the list, though.
I'd understand this better with an Example that we could dissect. One that shows the actual trigger and it's conditional state phrasing. The trigger wiz provides me the Action, Media, When, Object but after that yur on yur own!
11 Replies
Samantha:
Here's one quick way.
Set up a true/false variable. Something like stopAudio. Set the default value to False.
On the slide where the audio is playing, add two triggers.
Trigger 1 - The very first slide trigger in the list
Stop media "audio file name" when the timeline starts if stopAudio is equal to True
Trigger 2 - Doesn't really matter where this one goes
Set stopAudio equal to True when the timeline ends
What happens:
The next time the slide is visited, Trigger 1 checks the stopAudio variable. It sees that it's set to True. The audio is immediately stopped.
Note that this will require a different variable for every slide (stopAudio1, stopAudio2, stopAudio3 etc.) because every piece of audio needs to be stopped on an individual basis.
One other note: This will only work if the user listens to the end. If they don't, the audio will play again when they revisit the slide. If you don't care if they listen to the whole thing, just set the stopAudio variable to True when the timeline starts. Be sure that Trigger 1 remains at the top of the list, though.
Hope this helps.
Worked perfectly! Thank you so much :)
I would set the second trigger to change the variable when the media completes, rather than when timeline ends, just to be safe.
ok will do
thanks again :)
This is not working, I need to add a play media first, then tell it not to play if it has already when I jump back to the slide.
Hey Liz - do you have a sample .story file that you'd like us to take a look at to better assist?
Thank you for this!
I'd understand this better with an Example that we could dissect. One that shows the actual trigger and it's conditional state phrasing. The trigger wiz provides me the Action, Media, When, Object but after that yur on yur own!
Hi Thomas,
In case Steve is no longer subscribed to this thread, you can contact him directly on his ELH Profile.
The part in the triggers in Steve's post after the "if" is the conditional phrasing.
Super helpful, thank you!
This discussion is closed. You can start a new discussion or contact Articulate Support.