Jump to content

sprite input does not end?


Recommended Posts



I have an issue here...




if you click (not hold) the Phaser sprite, and then move the cursor away from it, the debug says it is still "over", and the cursor is still a hand until you click on the stage somewhere


any ideas.. is this a bug, or am i doing something wrong?


[update: this line causes it but shouldn't really be affecting it: this.game.input.mouse.onMouseMove = onMouseMove]


(what I'm actually trying to achieve is only move the sprite around the circle when the cursor is over it *and* the mouse is down. Drag doesn't help because you can move the cursor away from the sprite and it still counts as dragging it as per this example http://phaser.io/sandbox/hftdIYxX/play)




Link to comment
Share on other sites


this.game.input.mouse.onMouseMove = onMouseMove;


this.game.input.mouse.mouseMoveCallback = onMouseMove;

Worth noticing, mouseMoveCallback does not appear in the doc (and it's not a property of the Mouse class).


Doc : http://phaser.io/docs/2.4.4/Phaser.Mouse.html#members

Relevant code : https://github.com/photonstorm/phaser/blob/v2.4.4/src/input/Mouse.js#L321

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...