How do I limit audio to play just once on first visits to slide?

Sep 24, 2012

I have created a button slide that navigates user to an interaction then I need user to go back to button slide to press a second button Which takes them to another slide . How do I play audio when user first visits the button slide the and then stop audio on every subsequent visit after.

36 Replies
Bruce Graham

Hi Julie, and welcome to Heroes.

To do this create a variable - set it as "False", (call it "Audioplay" for example).

When they press the button, set the Variable to "True" first, then make the jump to whatever the button jumps to.

Set up a Trigger on the (first) slide that plays the audio "When Timeline Starts", if the variable is set to False.

This should mean it only plays once.

Hope that helps, and once again, a warm welcome. Shout if/when you need help.

Bruce

Tom Lunzer

Hello Bruce.  I am trying the same thing as Julie.  I have four picture buttons of melons.  When you click a picture button it goes to a "Menu" slide with some audio explaining the menu.  Each melon has a menu slide but I only want the audio explaining the menu to play once, instead of every time a user chooses a different melon.  I have tried your solution but it does not work.  Perhaps I am not setting up the variables correctly.  Could you include some screen shots of your variable settings.

Mike Enders

Tom,

Are you using layers or hopping back and forth between slides?  If you're hopping back and forth, all you need to do is set your main melon slide (with the audio) to resume saved state.  This way, when you hop back to the main slide, it picks up where it left off.  Thus, if the audio has already played, it won't play again.

Tom Lunzer

I am hopping between slides, but Resume saved state does not answer my problem.  If you use resume saved state , and the user leaves that slide before the audio is finished, if he returns again to that slide the audio will play from where it left off.  I don't want this to occur.  Also it does not solve my main problem which is the repeated play of an audio file I only want to play once.

Let me try to explain better.  I have a home page (main slide) with four pictures of different melons.  When you click on a melon picture it takes you to the first slide of four slides with information about that particular melon you have chosen.  This first slide is the Menu slide.  On that slide the user can click on four buttons labeled  "Description", "Look, "Taste", and Availability. Now on this first Menu slide I have a little audio instruction that tells the user to click on one of the buttons to learn more about the Discretion, Look, Taste or Availability of this type of melon.

Here's the thing, now that the user has heard this instruction, I don't want him to hear it again when he goes back to the home page and chooses another melon.  As it is now, when the user goes back to the home page and chooses another melon, he will go to that particular melons first Menu slide which will again play that audio instruction which I have on each of the Menu slides.

I would like a variable that allows that instruction audio to only play once, if it has been played.  Your variables instructions seemed like just the thing I needed but it did not work, I was thinking I did not set the variables correctly.  I am including a zipped up sample of my project if you want to see whats going on.

Bruce Graham

Hi,

Phil Mayor taught me how to do this (again) 20 minutes ago, I think it's what you want - basically, play instructions only once.

  • Setup a T/F Variable called "audioplay" or whatever, starting with Value of False.
  • Create an Audio Layer, (let's call it "AudioLayer" just for laughs.....) and put the audio on that layer.
  • Create a trigger on that AudioLayer to switch the audio variable to "True" when Timeline starts, and another one to Hide the layer when the audio completes, (or you can use the gear to close layer when timeline ends)
  • Have a Slide Trigger on the base layer that says "Show layer AudioLayer when Timeline starts if Variable = False"

Try that and see if it works.

If it does I will take the glory - if not - Phil fails.

Bruce

Tom Lunzer

Ok I got it to work with a little help from information from Articulatebrian's Screenr sample.

Here is the link for anyone interested...

https://player.vimeo.com/video/145579332

It is pretty much what you described but it was very helpful to have the samples on the video of exactly how the variables are set up.

Also most important for my use was that I had to duplicate each of the audio play variables ( I called them "playonce") on each slide that I had audio that I want to stop if the user returns there.  Another main difference  that I changes was that I changed the "set the audio to true" variable to NOT be when the media completes, but at the start of a timeline of a button (Variable Trigger button).  This button would normally be off screen.

I did this because I don't want the user to have to wait for the audio file to complete if he chooses to be impatient and go on to his chosen slide.

So what happens on each slide is the audio starts to play, then in a second the Variable Trigger button sets the "playonce" variable to true. 

I also included a button for the user to click if he changes his mind and wants to play the audio on the slide again.  This was part of my objective.  I have included a sample attached file.

iTechLibrarian ;-)

I realize that Storyline is the new baby however, many of us (and/or our respective companies) will not be purchasing it in the near future.

How or can a similiar function be created in Studio '09 with PowerPoint 2010? I have an audio clip that I want to play (when user clicks the button I created) on the first slide. I locked the first slide and inserted a hyperlink (on the button) to the audio file. I want the slide to advance only when the audio completes/ends.

Ashley Inselman

I have a related issue but not the same and can't quite figure out how to resolve it.  Hope one of the Super Heros can help!

I have audio narration on the top slide and then, audio on several layers under the top slide.  I need the audio to turn off when the user clicks to the next layer.  At the moment, if the user worked quickly (and I would hope they would NOT), they could have up to five different, competing audio narratives all playing at the same time meaning no one of them could understood.

Please help!!

Mike Enders

Ashley,

If each of the audio files is on a separate layer, you can accomplish this with the slide and layer properties (the little gear icon next to each layer name).  Have each layer pause the baselayer timeline as well as hide other slide layers.  If I'm understanding your goal, this should help you accomplish it.

Mike

Mike Enders

iTechLibrarian,

There's no stock way to accomplish this similar to Storyline, however, a little slide trickery in Studio could accomplish it.  

Slide 01: Contains your hyperlink to Slide 02.

Slide 02: Contains the audio file.

You'd have to lock down the nav so they can't progress until that slide's timeline has been completed.

Mike

iTechLibrarian ;-)

Hi Mike,

As always, thanks to you guys for such a quick response!

I don't want Slide 01 to actually advance or change. I just want the audio messsage to play when the hyperlinked button is clicked. I'll need to create a Slide 02 for the audio file to "sit" and lock it as well? Create a Next button (on Slide 02, hyperlinked to Slide 03 or next slide) that appears AFTER the audio track time frame, correct? Close?

Leslie Mallare

I was trying to the exact same thing as described above.  I had a variable set to "false" that would allow the audio to play on a layer the first time the menu slide was entered.  I would then set the variable to "true" which meant the audio wouldn't (shouldn't!) play when the menu slide was re-enterd.  I even displayed the variable on the menu slide and could see that it was true but the audio still played.  As mentioned by Bruce Graham, above, the following also needs to be done:

Hide the layer when the audio completes, (or you can use the gear to close layer when timeline ends)

It seems like it should be more clear cut and not play based solely on the condition of the variable but I guess that's something unique to Storyline.  At least now it works!

Teresa Scanlon

Thank you, Tom. I duplicated exactly what you have in the sample file and it works. Now I have a new problem: I previously have a state change on several items on my main slide to indicate that the user already chose those options to explore and are back to the main slide. However, when I use the "Reset to Initial State" setting (automatically decide didn't work), these state changes don't work. Help!

Rhonda Lemmon

HI All,  I have an assessment/activity with audio narrated instructions.   

I am trying to only allow the learner to be able to try the activity 2 x before they get a sorry response.

and I only want the audio instructions to play the first time the learner comes to the slide, don't want it to repeat when the slide returns to its initial state.

have to do initial state, since this is a drag and drop activity and I want the items/terms to go back to where they started.

so, this is where I am. can get only one of the variables to work at a time, not both.

either the audio will only play once and then stop, but it doesn't stop going to "try again".

or I can have the variable work where the learner can only try 2 times and then they get the sorry layer.  each time they return to the initial state the audio plays, which can be annoying.

Question... can you have two variables which will work together?  stop the audio after the instructions play once, and only allow the learner 2 tries at the activity, oh, and it has to return to the initial state so the drag and drop terms return to their initial state.

Thanks, Rhonda

 

Rhonda Lemmon

Thank you for replying!

I don't know if what you have suggested would work since the audio is on the base layer.

When the learner clicks on try again, it takes them to the initial state, which plays the audio again.   

Hope you can figure it out.  attached is one of the assessment/activities in the course.