I have implemented a mouseMove event handler. Simplified code:
if (event.stageX = 200) Alert.show('Intersection!');
Sometimes when I move my mouse quickly the event doesn't fire. How do I fix this?
How often is mouseMove fired? Can it be fired after every move by one pixel? Is adding a for loop to the mouseMove event handler very unefficient?
The mouse will not report every pixel it moves over. It depends on the kind
of mouse and speed of the computer. Single pixel targets are hard for
people to hit as well, so making the target bigger (even with see-through
pixels on each side) will help.
I've made a Flex app that measures the distance between the current mouse position and the previous one (received with the mouseMove event).
By moving my mouse very fast I've managed to reach 100px.