How can I stops actions/code at a certain frame?
So I have a fairly simple HTML5 project going with basic button navigation. I navigate to one section, then back to the main menu, then to other sections etc. I'm finding that when I launch the project and go to any given section of it, it works fine. But when I go back and forth between the main section and other sections it gets increasingly more glitchy.
My best guess is that everytime I return to the first frame I'm retriggering the code there, which is conflicting with the code that is already 'running' if that makes sense. What I think will solve the problem is if I add a line of code on the first frame that will end all currently active event listeners so that the code is essentially restarting fresh every time the user returns to the main menu to avoid any conflicting actions.
I'm pretty sure I've seen this done, and may have even done it myself at some point but I don't remember how to do it and I can't find a tutorial or example of it online.
Please help!
Thanks!
