URL of experiment: https://pavlovia.org/run/Tingyu/condition-1/html/
Description of the problem:
Hi all,
I have a code component which enables participants to replay sounds by clicking buttons on the screen. It runs well offline. I chose Auto > JS code type, but screen stuck online and the error message is: core.wait is not a function.
My code is:
if (mouse.isPressedIn(polygon_8)) {
sound_8.play();
core.wait(sound_8.getDuration());
sound_8.stop();
}
I cannot figure out which function to use online, thus help would be appreciated!
Thanks!
-Tingyu