Trigger to play audio after all objects clicked?

Jun 27, 2019

I've set up a click to reveal screen: learners click an image and audio plays. there are several images/audio files. How do I get summary audio to play after all of the images have been clicked?

Thank you,

Susan

3 Replies
Noel Read

You could use variables. Set up a number variable called summaryaudio and give it a value of 0. 

Then set up a trigger for each audio file that will add one to the summaryaudio variable when the audio file is clicked. 

The final trigger will run the summary audio file once the summaryaudio variable reaches a certain number - this number being the sum of all the individual audio files that you have.

Hope that makes sense!

Jerry Beaucaire

Noel's idea is good, as long as you instill a method to keep the number from incrementing more than once per object clicked.  They could click the same object multiple times and reach the final number too soon.

Another way is to set a unique STATE for each clicked item.  There is a Visited state you could use, or create your own.  So when they click the object and the media plays, a trigger also sets that clicked object to "Visited" when the media completes.

Then a single trigger can be used to watch all those objects.  Since your are updating the Visited state when the media completes, when the last audio completes and updates the last object, THEN it would see all objects are Visited and play the final audio.

State of All VISITED

 

bobby garcia

Piggybacking off both Noel's and Jerry's ideas:

Create a variable for each image that is viewed. Say you have 3 images to view, create 3 new variables (var_image1 = False, var_image2 = False, var_image3 = False). When each is clicked, they would set their respective variable to True. The n set a trigger (see Jerry's image) that will play the audio when all 3 variables are "True".

The trick is when to have the action triggered. Since the images have their own audio, I'm assuming they're layered with an Exit/Close button to get the user back to the main timeline. I suggest triggering this Close button to 1) Stop the image audio, 2) Play the summary audio if all variables are "True", and 3) hide layer. In that order.

Else, if you have a trigger to play the audio when all variables are "True", the summary audio might play while the image audio is playing as well.

This discussion is closed. You can start a new discussion or contact Articulate Support.