What is the proper way to get the stage mouse coordinates in HTML5?
I was using this code (which I am calling in each frame):
currentMouseX = Std.is(Lib.current.stage.mouseX, Float) ? Lib.current.stage.mouseX : 0; currentMouseY = Std.is(Lib.current.stage.mouseY, Float) ? Lib.current.stage.mouseY : 0;
It works great for the Flash target, but in HTML5 is lagging a lot, like over 1 second or something. I’ve tested both in Chrome and Firefox. I have to mention that there is a lot going on, so it’s part of a big code base