0

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?

Moonseeker
  • 78
  • 3

1 Answers1

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