留言板 留言板

返回

Disable Audio After First Play?

触发器
Disable Audio After First Play?
答复
19-1-11 下午4: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 票)

RE: Disable Audio After First Play?
答复
19-1-18 下午5:35 回复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.
0 (0 票)