Trigger audio response


(Ian bennett) #1

I was kindly sent this file from the Forum and have adapted it to suit my project. Is there a way that as well as displaying “Yay…” it also plays an audio file? I am thinking that visually impaired users would benefit from a sound that signified correct positioning.

Drag’n Drop - D-n-d_ReSet_JHSv1.hype 2.zip (14.3 KB)


#2

If you have a file audio.mp3 in your resources library, you would add this function after line 47:

var audio = new Audio('${resourcesFolderName}/audio.mp3');
audio.play();

(Ian bennett) #3

Thank you Daniel, I will give that a go


(Ian bennett) #4

Worked a treat, thank you again