How to remove event listener of a play audio button.
Hey guys!
I have a button on screen that I want to be able to tap and play an audio as many times as I want when on the screen. But after moving to the next frame I want to remove that previous audio buttons event listener. But I'm unable to do this.
This is my code:
The code the way it is, it only lets me play the audio once. To be able to play it as much as I want I need to delete the removeEventListener but then the event will persist.
Is there a way to remove ALL event listeners when moving to the next frame? I tried doing so on the goNext function but then I couldn't navigate or play sound anymore.
