More Taxes, and Mouse Event Fix?

Had another tedious slog through tax stuff today. This time, it was assembling, scanning, and uploading docs for my accountant. Since the due date for documents will be during my PAX trip, I want to get that squared away while everything is at my fingertips. The good news is that this should mean I'm free of this responsibility later in the year when I usually stress about it.

On the coding side, I think I may have solved the mouse event/button issue. I decided to add some debugging code to spit out log events when certain things happened to the button. Previously, I was trying to use breakpoints to examine variables when the problem happened. However, I was missing some context when doing that, not to mention the game window losing focus at the breakpoint meant the game behaved strangely.

The log events really helped, as it was much clearer what order things were happening in. And the cuplrit turned out to be the button switching to a highlight state immediately after being clicked and fired, but before it was removed from the screen. And later, when the mouse was clicked for another button, this button intercepted the event and fired first.

This is sort of a collision between mouse events in Flash and Flixel, as each tries to handle it differently. Normally, this wouldn't be an issue because Flixel overrides most Flash events. However, that override was causing touchscreen events to be ignored.

Ultimately, I was able to find a way to clear the button's state when it was removed from the screen. This way, it wouldn't fire on future mouse events.

I still want to verify that there aren't other "gotchas" in the button code I've missed, both with the original bug and with this proposed fix. Hopefully, I'll have more time to explore that tomorrow.

That's all for now. Have a good night, all!


xsmpjy's picture

It is really interesting to see the reaction of the people playing Halo. They are supposed to be interested with that one. - <a href="">Flemings Ultimate Garage</a>