Multiple listeners
Hello, I have finally managed to create my event listeners for both mouse hover and tap, and a mouse out.
I have 16 elements that I need to enable animations for.
Each element has its own movie clip and dedicated button and a corresponding instance.
If I add another element to the code, I don't get the desired result as only the first button enables the last element programmed.
I don't understand why because all the instance names are correct and the code also has all the instances replaced in the code.
Is there something that I don't know and I should know when having multiple event listeners?
So far I have copied and pasted the same code replacing the instance names (and adding all the animation in the involved movie clips, with relative stops.
Plase, find the code below.
Thanks in advance 🙂
//BELLY
this.bellyBT.addEventListener("click", MouseClickFunction.bind(this));
function MouseClickFunction() {
this.bellyMC.play();
}
var frequency = 3;
stage.enableMouseOver(frequency);
this.bellyBT.addEventListener("mouseover", MouseOverFunction.bind(this));
function MouseOverFunction() {
this.bellyMC.play();
}
this.bellyBT.addEventListener("mouseout", MouseOutFunction.bind(this));
function MouseOutFunction() {
this.bellyMC.gotoAndPlay(6);
}
