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
38 Replies
- EricNalian1Community Member
Hey Jill,
One thing you could try is create a True/False variable that changes to True when the audio completes. Next, create a trigger that says 'When Timeline of [Any object on the slide that starts at the beginning] starts, pause audio if VARIABLE = True'.
I think this should do it.
-Eric
- JillFreemanCommunity Member
Great idea, Eric! I'll give it a try. Thanks for your help.
- JohnnaHodges-04Community Member
I am fairly new to Storyline 360 (any Storyline for that matter) and have a similar question to the one posted above.
I have a drag and drop activity slide in my Storyline project. With that slide is a recorded audio file giving the user some instruction. If the user drags and drops the items incorrectly, they can select Try Again. The Try Again option resets the drag/drop objects - which I want, but the audio replays - which I don't want. I am wondering if anyone has any suggestions on what I might do? Like I said, I am fairly new to this program and don't know a lot about variables.
Thanks very much
Johnna Hi Johnna! Thanks for your question!
I would use a variable to play the audio only when the learner first visits the slide. Here's how I would set that up:
- Create a true/false variable named "audioplay".
- Set the default value to false.
- Add this trigger to the drag and drop slide base layer: "Play media [audio] when the timeline starts if the variable audioplay is equal to false."
- Add another trigger to the drag and drop slide base layer: "Adjust variable audioplay to true when the media completes [audio]."
One more tip: if you have multiple drag and drop slides with audio, you'll need a unique variable for each slide.
Give it a try, and let me know how it goes!
- JohnnaHodges-04Community Member
Alyssa,
That worked perfectly! Thank you so much.
- AnnieSpringate-Community Member
Excellent thank you!
- EdmondManningCommunity Member
Hi there, it's the Future, checking in. Tonight you helped me solve a problem that's irritated me, a noob to Storyline. Thank you, thank you! Who knew 7 years later someone would find such a concise well-written answer. I watched 3 min of two different videos before I doubled-down on a non-video solution. Seeing it in writing was essential for me. Thank you!
- KevinKowalski-eCommunity Member
Hi Alyssa, Articulate Heroes Community,
I have a splash page menu with audio. There are two or three clickables which direct to a subpage. Once the learner returns to the main splash menu page, I do not want the audio to replay. I've followed the steps described above to add a trigger using the True/False Values and now when I publish the course and test it in both my LMS and via the Web, there is no sound on the main splash page. If I were to load a sample of the course, would someone be willing to help me out? I feel like I'm close but something must be missing of off? I am not receiving any errors.
Any help or guidance would be greatly appreciated.
Thanks, Kevin
- WendyFarmerSuper Hero
Sure Kevin
upload the file and someone will give you a hand - it could be the order of your triggers but let's take a look.
- KevinKowalski-eCommunity Member
Hi Wendy,
Thanks so much! I've attached the zipped SCORM file.
- KevinKowalski-eCommunity Member
Hi Wendy,
Please remind me how to send it and what specific output you need. Newer user here.
PS - I may have figured out the issue. I have multiple screens where I want to stop the audio so I set up new True/False variables. My first pass, I was reusing the same one on multiple screens so I think that was the issue.
Thanks, Kevin
- WendyFarmerSuper Hero
Hi Kevin
you're correct - you need to either reset the variable if you are using the same one or have a unique variable to control each audio file.
For future, just click the grey 'Add Attachment' button at the bottom of the post to upload your .story file if you want someone to look at your file.
All the best with your project :-)
- KevinKowalski-eCommunity Member
Thanks, Wendy. Appreciate the quick response time and willingness to assist.
- WalterStinnettCommunity Member
Hello, I have just recently started working in Articulate. Because of the security situation here I can only use Articulate 3. I have a module where the user will click a link to be taken to a certain section similar to Jill's original question. After the user works through that section they will have to click back to the main page to click another link to proceed to the next section. When the user clicks back after viewing the section the audio on the main page continues to play. Is there a way to stop the audio when the user clicks away from the main page instead of when the audio completes? It seems like that you can get through the slides in the section quicker than the length of the audio on the main page. Unfortunately I can't send a copy of my work due to security issues. Any help would be appreciated.
- JohnMorgan-c50cFormer Staff
Hi Walter!
Good news! There is a way have the audio play on a slide only on the first visit! I would use a variable to play the audio only when the learner first visits the slide. Here's are the steps to set that up:
- Create a true/false variable named "audioplay".
- Set the default value to false.
- Add this trigger to the drag and drop slide base layer: "Play media [audio] when the timeline starts if the variable audioplay is equal to false."
- Add another trigger to the drag and drop slide base layer: "Adjust variable audioplay to true when the media completes [audio]."
One more tip: if you have multiple drag and drop slides with audio, you'll need a unique variable for each slide.
To stop the audio when the user clicks away from the main page you could add a 'Stop media' trigger. Add this trigger to the drag and drop slide base layer: "Stop media [audio] when user clicks on the next button"
Since you mentioned you are new to Storyline, here are some articles to get you going in the right direction!
Thanks for reaching out!
- RusudanSimongulCommunity Member
Hello, your tips are useful, but what to do when you have multiple media on one slide and i had them set on timeline one after another, when i use new triggers i am not able to move them at all and this approach does not work. Looking forward to your reply
Hi RusudanSimongul,
Thanks for reaching out!
If I'm understanding correctly you have multiple elements included on your slide and once you insert a new trigger you're unable to prevent the audio from playing. Is that correct?
- Could you share what triggers you are implementing into this slide? It would be helpful to know what kind of media you are including as well to better understand.
It would be great to take a closer look at your setup to provide suggestions. Feel free to share your .story file in this thread or privately in a support case.Looking forward to hearing from you!
- Karenuqkolav1uqCommunity Member
Hi John,
I have followed your advice (except that I called the variable "playonce") as I was following another post, but it just does not work for me. The audio will start again when I return to it. The variable is working because it chances to "true" (I added a text box with "false" on it) Can you help? please see my screenshots with the triggers I have added.
I have tried different things with the slide properties " Resume saved state" and "reset to initial state" and it does not work with any of those two.
I wonder if I should add more variables considering that on the screen that the audio is played it is also shown different images aligned with the audio and I want the learner when they return to the slide with the audio to see the latest images that were displayed. Should I add another trigger? or should the audio trigger be enough?
- WendyFarmerSuper Hero
Hi Karen
is the playonce variable only referenced once on that slide or are you reusing it on other slides?
If you can share your .story file someone can take a look and try to help you.