Is there a way to clear an event or otherwise notify flash that it’s been handled already?
One problem I’m running into is the following:
From the main menu, a single click takes the user to the instructions screen.
Once on that screen, a click takes the user back to the menu.
However, the problem I’m having is that a single click quickly shows and then hides the instructions instantly. I think this is because both mouse click listeners are firing from the same click. Things are set up like this:
1) add an event listener for mouse click on the main menu
2) on click, the instructions image is shown. the old click listener is removed and a new listener is added.
3) the new listener is supposed to dismiss the image and restore the original listener.
When the user clicks, both listeners trigger. Is there an easy way to avoid this?
So far, I just have been using a timer that delays creating the second listener for a couple frames so there is no chance the single click will register twice.
Any tips appreciated…
Loading