I need some advice on controlling audio in an HTML5 interaction. There don't appear to be any "code snippets" to do with audio, and I need to create buttons that control the playback of an the sounds in the piece. I managed to track down some code that's allowed me to set up buttons to play and stop sounds.What I need to make is a start button that will play the sound, hide itself, show a stop button in its place, then, once the sound is over, show itself again and hide the stop button. What's the best way to arrange this?
use addChild and removeChild to add and remove your buttons.
Unfortunately, I don't quite understand how that would work. Could you elaborate somewhat? I am not especially code-literate.
//to show play_btn and hide stop_button:
//to do the opposite
// no need to change