I am using the contentMouseover event on my stage to show the user the XY-value of the pointer position. What I observed is that different browsers have different attributes of the event object. On Opera the event object has x,y attributes, on Firefox they are unknown. My question now: How can I get the x and y value where the event occurred on all browsers? Which attribute is to be used?
Asked
Active
Viewed 48 times
0
-
You can use a framework like jQuery. It has crossbrowser wrappers for stuff like that – Agustin Meriles Nov 27 '13 at 17:30
1 Answers
0
Inside your contentMouseover event handler you can get the stage mouseX/mouseY with stage.getMousePosition:
var pos=stage.getMousePosition();
var mouseX=pos.x;
var mouseY=pos.y;

markE
- 102,905
- 11
- 164
- 176