diff --git a/src/entry/app.js b/src/entry/app.js index a7e50f1..d9d715e 100644 --- a/src/entry/app.js +++ b/src/entry/app.js @@ -226,7 +226,7 @@ function inappInterfaceGuide () { currentButton.className = 'interface-button'; currentButton = target.parentNode; currentButton.className = currentButton.className + ' interface-button-selected'; - ScratchAudio.sndFXWithVolume('keydown.wav', 0.3); + window.parent.ScratchAudio.sndFXWithVolume('keydown.wav', 0.3); } }; document.addEventListener('touchstart', switchHelp, false); @@ -276,7 +276,7 @@ function inappPaintEditorGuide () { currentButton.className = 'paint-button'; currentButton = target.parentNode; currentButton.className = currentButton.className + ' paint-button-selected'; - ScratchAudio.sndFXWithVolume('keydown.wav', 0.3); + window.parent.ScratchAudio.sndFXWithVolume('keydown.wav', 0.3); } }; document.addEventListener('touchstart', switchHelp, false); diff --git a/src/utils/ScratchAudio.js b/src/utils/ScratchAudio.js index b17a0e6..754a838 100755 --- a/src/utils/ScratchAudio.js +++ b/src/utils/ScratchAudio.js @@ -183,4 +183,6 @@ export default class ScratchAudio { } } +window.ScratchAudio = ScratchAudio; + window.addEventListener('touchend', ScratchAudio.firstOnTouchEnd, false);