I am working on a HTML5 web quiz game in Adobe Animate and I am having trouble removing a bound click event listener. Any help would be much appreciated.
Here is how I add the event listener:
this.choiceA.addEventListener("click", this.f_choiceA.bind(this));
Here is the function that runs and attempts to remove the event listener. It stays in place and activates the function with every click on the choiceA object.
this.f_choiceA = function()
{
this.choiceA.removeEventListener("click", this.f_choiceA.bind(this));
this.choiceA.play();
if (answer == "A"){
this.correctAnswer();
}
else {
this.wrongAnswer();
}
}