Forum Discussion
How to prevent audio from playing when returning to slide
Hello! I would like to find an elegant way to prevent the audio from playing if a user returns to a "main menu" slide.
Let's say that I have a slide that requires a user to view 4 scenarios by clicking on 4 objects. The audio on this "main menu" slide plays and completes. The user clicks one of 4 objects that take them to view a Scenario on a new slide. When they are done viewing a scenario, they click next which returns them to the "main menu" slide with the 4 objects they must click. (I'm using states to keep track of when user has visited each object/scenario.)
It is uncool to re-play the original audio each time they return to the main menu. I tinkered with triggers but could not figure out how to stop the audio from playing on their subsequent visits to the slide. I have a workaround that will suffice for now.
I appreciate your ideas! -Jill
Hi Nina,
Thanks for reaching out!
I took a peek at your file, and I saw that the True/False Variable for the Allocated layer was set to False. I went ahead and changed the trigger to True and modified the other layers to False so that the audio does not replay and navigates through the slide correctly.
I'll attach a copy of the update .story file for you. Let us know if you are still experiencing this behavior with the audio and navigation. We're happy to assist further in this discussion or in a support case.
Have a great weekend!
- NinaPrescott-98Community Member
Hello,
I am having an issue with 1.13 Allocated. It was corrected before and now it's not working, I tried to fix it. The first one works fine but the others do not play the audio and return to the menu.
- NinaPrescott-98Community Member
Hello,
I am having an issue with the 1.13 audio trigger. I am trying to stop the audio when the user returns back to the menu selection on this slide. I had another trainer review the coding and they don't see where the error is. My team doesn't use the coding that often and I am trying to learn it. I have the audio and the notes in the section so you will hear what the prompts are.
Thak you!
- NinaPrescott-98Community Member
I got it to work now!
Hi Nina!
Thanks for following up! So glad to hear the issues with your audio trigger have been resolved!
If you run into any setbacks moving forward, please let us know!
- NinaPrescott-98Community Member
Hello,
I was able to get the audio to stop playing. However, I am now having a technical issue with Slide 1.4- What is... It won't play the intro audio prior to the user clicking on each petal. Can you verify if there is a trigger that will be required or if you hear the audio?
Hello Nina,
The introductory audio in Slide 1.4 doesn't automatically play on the slide because of this trigger condition:
The default value of the variable is 'True', so this audio file won't play until an event changes the value of this variable to 'False'.
You'll need to first change the trigger condition so that it will play the audio when the value of the variable is true, and then set an even to change the value of this trigger to false, or vice versa.
Hope this points you in the right direction!
- NinaPrescott-98Community Member
Hello Lauren,
I am trying to learn how to modify the audio trigger. I am trying to stop the audio when the user returns to a menu slide or a previous layer.
Thank you!
Hi Nina!
Thanks for your reply; I'm happy to chime in! Did the steps and project file shared here work for you? If not, do you mind sharing your modified Storyline file, as well as the steps and triggers you're currently using to stop the audio? I'd love to help, but first, I need to see what we need to tweak in your modified file.
- NinaPrescott-98Community Member
Hi Nina!
Do you mind clarifying which process you're looking for the steps on? Is it finding the User Count for variables or modifying the audio trigger?
- NinaPrescott-98Community Member
How did you add the Use count of 5? I enclosed My view of the Image. When I open the program I can label the project variable, I don't have a hyper link on the use count? I am able to view your conditions that were set. Also does Storyline have class we can take/or pay for? I currently take the free ones when they are offered.
Hi Nina,
Happy to chime in!
The 'Use count' of 5 was automatically added by Storyline 360 based on how many times triggers referenced the variables. Most of the count is for the triggers that are found in the layers of the menu items:
Since you are interested in signing up for training sessions, I wanted to invite you to our tips and tricks webinars. Once each month at 11am ET, our training team hops on a live call to answer top questions from our customers.
It's super casual (and they're super smart!), so it's a great place to get expert tips and answers to frequently asked questions from our online community. In short, everything you need to create incredible online learning! You can register for the next call here: https://articulate.fyi/3ZiKgu9
And don't worry if you can't make it, because everyone who registers will get a recording sent to them afterwards! There's also a huge list of on-demand past trainings available.
Hope to see you there!
- NinaPrescott-98Community Member
Thank you very much! I will take a look and if I have questions, I will keep you posted.
- NinaPrescott-98Community Member
Hello,
I am trying to stop audio from playing when the user returns to the menu under an image. The menu is not on my base layer. It's on my 4th layer. I was able to add:
- Create a true/false variable named "audio play".
- Set the default value to false.
However, I am stuck on where to go next?
I am enclosing my work on slide 1.11
Hi Nina!
Thanks for sharing your file. Happy to help!
On slide 1.11, I added a trigger on each of the four button layers to adjust the variable (audioshouldplay) that disables the audio.
I also removed several unnecessary triggers, most of which being the pause audio triggers. I've attached a revised copy of your .story file for your reference.
Please let me know if you need anything else!
- AlieGreenhornCommunity Member
I'd love to help you out but I'm not sure how you have the slide setup to make a reliable suggestion. From just the way you described I imagine the solve to be this.
1. Create a true/false variable with the default set to false, let's just call it "Complete" on the slide with audio.
2. Create a trigger to play the audio on the slide when timeline starts with the condition "if Complete = false"
3. Create a trigger that changes that variable "Complete" from false to true when the media completes.
Here may lie a problem.
- If your user clicks Next before the audio has a chance to play through completely, the trigger in step 3 will not fire and you will encounter the problem you described. If you want to prevent this, you have to make sure that your learner listens to the entire clip. So here's what I would do to force the learner to listen to the audio clip at least once.Create a trigger on the slide with the audio that disables the Player Next button on the slide if the variable "Complete" is "false". This makes sure that it doesn't fire when you revisit the slide after completely listening to the audio on a previous attempt.
Create a trigger on the slide to enable the player Next Button when the audio on the slide completes.So what should happen is:
- User visits slide for the first time, Next button is disabled.
- Audio plays automatically, has to be listened to completely before next button is enabled,
- User goes to the next slide
User revisits slide with audio, audio won't play, Next button is already enabled.
As Wendy mentioned above, this will work on a slide-by-slide basis so your "Complete" variable has to be unique for each slide with audio you want to behave this way. i.e. "Complete1", "Complete2" etc... since variables are global.
Again, best guess, if this doesn't fix your issue, upload at least the slide you need help with for us to get a better picture.