Back to the Shapespark home page

2 action on one click possible?

It could be easiest if you controlled the audio playback directly using the browser API and do not rely on any Shapespark audio related functions.

Place the audio file in the Documents\Shapespark\YOUR-SCENE-NAME\extra-assets\ folder. Then create an HTML audio element like this:

var audioElement = document.createElement('audio');
audioElement.src =  WALK.getExtraAssetUrl('your-audio-file-name');

You can then call .play() and .pause() on this element. Here is the full audio element API: