How to prevent audio from playing when returning to slide

Oct 18, 2012

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

35 Replies
Johnna Hodges

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 

Alyssa Gomez

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!

Kevin Kowalski

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

Kevin Kowalski

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

Wendy Farmer

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 :-)

Walter Stinnett

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. 

John Morgan

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!

Karen Olave

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?

 

Carrie Anderson

I am having the same issue. I am using the TF variable. It works if you listen to all of the audio on the slide, but it doesn't work if you leave the slide to another and back. It replays the audio from the beginning. 

I need the audio not to replay again when they come back to the objectives slide. 

Would anyone be able to help me figure out a solution?

Alie Greenhorn

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.

Nina Prescott

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

Steven Benassi

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.

payroll-cost-layer-fixed

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!

Nina Prescott

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.