Forum Forum

Retour

Disable Audio After First Play?

Bascule
Disable Audio After First Play?
Réponse
11/01/19 16:08
I have a main menu that has an introduction audio clip on it.  I'd like to disable the audio so that it does not play ever time users return to that menu.  I have variable set up to gray-out menu options when each section is completed.  I tried firing a global event to disable that audio clip when the first variable is True.  That didn't work.  Are you able to give me any ideas?  Thanks! 
0 (0 Voter)

RE: Disable Audio After First Play?
Réponse
18/01/19 17:35 en réponse à Scott Sheridan.
Hi Scott,
Great question, and thanks for posting it on the forum!

You'll want to tackle this almost exactly like you do disabling a section (use a variable to track whether or not it has been played).  The secret here is that you'll want to turn off Auto Play on the audio, and instead use actions to play (or not play) the audio.

The variable will default to false, so it will play the first time, and the second action will flip the variable to to true once the audio has ended.  You can change the trigger to on page load, if you don't care if the audio has played through entirely once.

Pièces jointes:

Attachement

0 (0 Voter)