Forum Discussion
How to play audio files by hovering over text
Hi all,
For all you Javascript gurus out there... I am trying to create a storyline file that caters for accessibility and in this case plays a unique audio file every time you either hover over or click a piece of text on the screen and then stops when you hover or click on another line of text. For example, if you had 2 headings on the screen saying "Section One" and "Section Two", the respective audio will play for these.
Now, I went on Microsoft co-pilot and asked it the following:-
"Write a javacript function in Articulate Storyline where if you click on a some text, it plays an audio file, let's say that this is called sound1.mp3 but if you click on another piece of text, sound2.mp3 plays and sound1.mp3 stops."
It actually wrote some javascript and gave me instructions how to implement it within Storyline. So... I went ahead and done this, tested it and found out that for some reason it is not working! I have looked at the javascript and for the life of me, I cannot see why this cannot work!
I have attached the source file if anyone would like to take a quick look!
Thanks in advance