-
Senior Member
Event priority...troubles...
Hi...
Just having a bit of a UI issue here, maybe someone can help;
I've got an ENTER_FRAME function running in a certain class, that does one thing when the mouse is down and something different when the mouse is up. When a certain Sprite gets a MOUSE_DOWN, a class-level var called mouseIsDown is set to true, and a listener for the MOUSE_UP is created on the stage (so it shouldn't have to bubble...I think...?) When the MOUSE_UP fires, mouseIsDown is set to false.
The ENTER_FRAME function forks at its start depending on the state of mouseIsDown.
The problem is, about one out of five times, the MOUSE_UP is too slow; the mouse is actually up, but mouseIsDown hasn't been set false yet when the ENTER_FRAME goes. Since I can't directly poll the state of the mouse anymore from the ENTER_FRAME (which has got to be the stupidest change in AS3), how can I ensure the Mouse event will propagate first? Even if I set the priority higher, it doesn't seem to help...
Any thoughts?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|