vez Posted July 15, 2015 Share Posted July 15, 2015 I'm having trouble getting mouseOutCallback / mouseOverCallback to work. Heres my code in the create function: game.input.mouse.mouseOverCallback = function() { console.log('over'); }If I simply replace game.input.mouse.mouseOverCallback with game.input.mouse.mouseDownCallback the console logs 'over' when the mouse is pressed, but does not log 'over' with game.input.mouse.mouseOverCallback when the mouse enters the canvas. Sorry if this is very basic, thanks for taking a look. Link to comment Share on other sites More sharing options...
substandardgaussian Posted July 15, 2015 Share Posted July 15, 2015 I actually have the exact same problem. I took a break from dealing with mouse controls for a bit, I guess sloth and prayer didn't find a fix for me! I'll probably be trying to figure out what's wrong here sometime in the next couple of days, but I'd appreciate an answer in the meantime as well. I've found that it doesn't work on both on Firefox and Chrome, even with mouse capture. Link to comment Share on other sites More sharing options...
wayfinder Posted July 15, 2015 Share Posted July 15, 2015 You could try and attach it to the canvas (game.canvas.onmouseover = function... is the way to do that iirc) Link to comment Share on other sites More sharing options...
vez Posted July 16, 2015 Author Share Posted July 16, 2015 Thanks a ton wayfinder that's a nice easy simple fix! It's still strange that those functions are non-functional though. Link to comment Share on other sites More sharing options...
Recommended Posts