Copy link to clipboard
Copied
let root = this;
this.mybutt.addEventListener ("click", playSound);
function playSound () {
createjs.Sound.play("mymix");
}
Copy link to clipboard
Copied
what's the link to your html?
Copy link to clipboard
Copied
Do you mean the url?
https://delightfulgreetings.com/soundtest/soundTest.html
Thanks
Copy link to clipboard
Copied
you have an error in your code. (ie, learn* to use the developer console of your browser.)
specifically, this.currentSoundStreamInMovieclip.instance is undefined
*
lesson 1 - https://youtu.be/PBDQN9CQSeI
lesson 2 - https://youtu.be/KJEl0OenGUY
Copy link to clipboard
Copied
Thanks for this. I appreciate the "teach a man to fish..." videos and I have gone through them which will stand me in good sted. The bit I am unfamiliar with now is that the code works locally so is it something to do with the AudioContext not being allowed to start is causing ther undefined'ness? If so do I still need ot find a tutorial resource for AudioContext js for beginners?
Copy link to clipboard
Copied
that error should appear with local testing too. open the developer console in the local test.
Copy link to clipboard
Copied
You are correct of course , the error is there however the sound plays when I click the button locally.
Any other guidance, its getting a bit heavy for my level of knowledge. If not I'll have to get it coded for me as I have spent a whole afternoon googling. Just thought it must be a standard issue for anyone playing audio from a webpage.
Copy link to clipboard
Copied
post a link to your fla.
Copy link to clipboard
Copied
I have put it as zip so it should download ok. Thanks. Is the whole AudioContext a red herring?
Copy link to clipboard
Copied
sound works for me despite the errors when testing and on my server, https://kglad.com/Files/forums/soundTest.html
did you remember to upload your published folders (including sound)?
Copy link to clipboard
Copied
Oh my days!! I re uploaded everything and it works. I am so sorry to have wasted your time, however I now know about debugging.
Thanks ... Im a bit embarrased.
Copy link to clipboard
Copied
you're not even close to my record of stupid errors. part of the reason i!m pretty good at helping others is because of how many errors i make/made and have to fix.