Copy link to clipboard
Copied
I'm having trouble with multiple buttons (all with unique instance names) working. Some do but when I have an arrow cycling through some content, the first one works, then the subsequent ones don't. I'm using this code for each button and changing the instance name and function name each time. Other buttons work in layout but where they are replaced with another in the same spot, it doesn't work. Any idea how to fix?
this.Next2_btn.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_44.bind(this));
function fl_ClickToGoToAndPlayFromFrame_44()
{
this.gotoAndStop(1);
}
1 Correct answer
If you're just swapping out one button for an identical button, then... why? Why not remove and replace the event listeners instead?
Copy link to clipboard
Copied
Open your browser dev console and check for errors.
Copy link to clipboard
Copied
doesn't seem to be any, is there any reason different buttons with different instance names shouldn't click to frame numbers? Sooo frustrating. Other btns work ok, it's the ones in the same spot that replace eachother (arrowing through page content, for instance) that do it...
Copy link to clipboard
Copied
If you're just swapping out one button for an identical button, then... why? Why not remove and replace the event listeners instead?

