Playing same sound file automatically and on trigger
Mar 20, 2013
I've set up some slides so that a sound file plays automatically. I then want users to be able to click on an image on the slide so the same sound file plays again. I tried to do this by having the sound file on the slide singularly and then applying a trigger to it. When I do that it only works on the trigger but doesn't play automatically. As a work-around I've copied the sound file so that it is on the slide twice and applied a separate trigger to it. That works fine. However, if a user is impatient the automatic sound file can still be running whilst they press the trigger for the same sound file to play and they run at the same time making it hard to understand the sound file. Is there a way of structuring the trigger so that the sound file only runs if the automatically played one has finished? Apologies if I haven't explained that very well!
13 Replies
Paolo,
I'd try this:
From a clean slide...
1. Add a trigger to play media when timeline starts (navigate to your audio file and select it)
2. Add a button with a trigger to play that same media file.
I've attached a sample.
Mike
Hi Mike
Thanks for your reply. I can't do what you say because I already have a background sound file which runs as soon as the time line starts (I've attached a sample slide to explain). On my lion slide I have a sound file of a lion roaring which starts as soon as the time line starts. When the roaring sound file finishes another sound file starts automatically and this says 'un lion' in French. That all works fine. I've also set up a trigger so each time a user clicks on the picture of the lion it repeats the phrase 'un lion'. However this is going to be used by young kids (4 to 8 years old) and they are not always patient so they will click on the lion whilst the automatic version of 'un lion' is still playing. When you do that both sound files run at the same time but out of sync so you cannot hear them properly. That's what I'm trying to rectify / avoid.
Paolo,
Ah, I see.
Okay, in that case, you'll need to evaluate whether that first instance of "un lion" has finished playing or not. A simple way to do this is to utilize a true false variable that's tracking whether the first instance has completed. I've attached an example.
I hope this helps.
Mike
Hi Mike
Can you please re-attach your example file as I can't seem to open the one originally attached.
Thanks.
Paolo.
Paolo,
Reattaching. Are you getting an error message when you try to open?
It's working now.
Thanks Mike.
I've copied your slide to my story and it works fine but when I try to replicate the triggers you have cretaed on other slides they don't seem to work. Am I missing something obvious?
Ummm...not sure. I'd have to see your other slides.
Can you load another slide for me to view?
I think I'm doing something wrong when I create the variable. When I use the variable you created (LionRoar) on any of my slides it works correctly. However, if I use a variable I create it doesn't work. When I create a variable I give it a name, select True/False for the Type and select True for the Value option. Maybe that is where I am going wrong? As a work around I'm continuing to use your LionRoar variable and that seems to be working fine. Sorry for being a pain!
Paolo,
I started the LionRoar off with "False" as the default value.
When I use True False variables, I find it helpful to think of a particular action... "has it happened yet?". At the start of a course the answer is "false, it hasn't happened". Then, when the action does occur, it switches to "true, it has happened".
So in the case of your project, we start the variable off as "False, the Media hasn't yet completed" Once the Media does complete, then we switch the variable to "True, the media has completed", so now the condition is met and the other audio file can be played when the learner clicks the lion.
I hope this helps!
Thank you Mike.
That explains why mine weren't working.
You're a star!
You're welcome sir.
Just let us know if you have any other questions, and we'll do our best to help!
This discussion is closed. You can start a new discussion or contact Articulate Support.