danbruegge Posted September 4, 2014 Share Posted September 4, 2014 Hi, i don't know what is wrong with my code, but the button hover will not work correctly. Here is my button code:self.buttons.start = self.game.add.button( parseInt(self.game.width / 2, 10), parseInt(self.game.height / 2, 10), 'buttonSprite', function () { self.clickAction(); }, self, 4, 7, 5, 6);self.buttons.newCreep.anchor.set(0.5); self.buttons.newCreep.input.useHandCursor = true;When my mouse cursor enters the button, it will display the hover image. But if it leaves, the hover image won't disappear. Its still frame 4, not frame 7. I can't figure out whats wrong with this code. Link to comment Share on other sites More sharing options...
eguneys Posted September 4, 2014 Share Posted September 4, 2014 switch 7 and 4 see if frame 7 works properly. Link to comment Share on other sites More sharing options...
danbruegge Posted September 4, 2014 Author Share Posted September 4, 2014 Has the same behavior. :/ Link to comment Share on other sites More sharing options...
eguneys Posted September 4, 2014 Share Posted September 4, 2014 You are right, here is an example: http://jsbin.com/nader/1/edit?html,js,console,output Link to comment Share on other sites More sharing options...
danbruegge Posted September 4, 2014 Author Share Posted September 4, 2014 Ok, so it is not my fault. Maybe it is my phaser version. I use 2.0.6. In this tutorial: http://gamedevelopment.tutsplus.com/tutorials/getting-started-with-phaser-building-monster-wants-candy--cms-21723 the phaser version is 2.0.7. Link to comment Share on other sites More sharing options...
danbruegge Posted September 4, 2014 Author Share Posted September 4, 2014 Ok, it was the phaser version. With 2.0.7 it works all fine. Thanks for helping. Link to comment Share on other sites More sharing options...
Recommended Posts