Message Boards Message Boards

Back

Disable Audio After First Play?

Toggle
Disable Audio After First Play?
Answer
1/11/19 4:08 PM
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 Votes)

RE: Disable Audio After First Play?
Answer
1/18/19 5:35 PM as a reply to 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.

Attachments:

Attachment

0 (0 Votes)