PennController for IBEX › Forums › Support › Audio playing twice › Reply To: Audio playing twice
April 27, 2023 at 3:47 am
#10486
Jeremy
Keymaster
Hi,
After the wait
command on the Audio element, instead of removing it immediately, tell the script to wait a second time before removing it. Now, you don’t want that second wait
to block the rest of the script (ie. you want the TextInput element to appear immediately after the first playback, even if the audio isn’t played back a second time) so you need to run those instructions in parallel, in the callback
command of a Timer element for example:
newAudio("audio", row.audio) .center() .print() .wait() , newTimer(10).callback( getAudio("audio").wait().remove() ).start()
Jeremy