Link to home
Start Free TrialLog in
Avatar of Mike Rudolph
Mike RudolphFlag for United States of America

asked on

Trying to run sound when function is clicked

So I am modifying a copyright free script from online to work in my classroom. I am trying to get sound to play when I press the 'go' button but don't know exactly where the code should go. When you open up the "Double Click Me.html" file you will see the script to play the sound. I have the call to the playsound function in the  go() function. But for some reason no sound in playing. I've attached the file and all relevant code.

Look for some guidance where the call should go so I can play the sound file located in the 'sound' folder. Thanks!
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

you have not attached anything.
Avatar of Mike Rudolph

ASKER

That's weird. I guess .zip files are not allowed as attachment. Here they all are...
https://drive.google.com/drive/folders/1xRc1KKy0HxMDzOP2uK4-G2zQlo28nn7i?usp=sharing
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Remove the following two lines and check again:
81.   $.get();
355.  playSound("sound/Pocket60.mp3");

Open in new window


It works fine for me after clicking on the "GO" button now :

Working sample
Zakaria,

Thank you! I removed both lines but still not working...

Mike
David,

Thank you so much! Can you tell me where specifically the changes were?

mike