HTML 5 - stop 1 sound but keep the other sounds playing
Hi 🙂
I am trying to convert an old AS3 game I created ages ago to HTML5.
The original had a few buttons each playing a different voice and you could click each of them once to start and again to stop. Stopping one would not affect the others who were already playing. The fun was to try and get a nice harmonious tune. I want to do this in HTML. I am very new to this!
I tried using createjs.Sound.play("tuneID"); to click a sound on and then createjs.Sound.stop("tuneID") to click it off but the latter simply switches all the sounds off 😞
I need the tune to start from the beginning whenever it is switched on so originally I had the button move the play head inside a symbol to a frame with sound event-Start/loop and then, when clicked again, to a frame with a stop sync. But I realised those options are not available with HTML.
Is there a simple way to do this?
Can it be done with sounds imported to the library or do I need to call external sound files?
Is this doable?
Any advice will be greatly appreciated!
Thank you.
