robomatix Posted August 20, 2014 Share Posted August 20, 2014 Hello ! I'm working on a micro game that can be tested on this page : http://le-carre-noir.net/click-the-black-squares-beta/ On a mouse-in on my button GO, the frame is changed, so it goes green... But it doesn't go back white on mouse-out... Here is my code :this.button = this.game.add.button(this.game.world.centerX, 525, 'startBtn', this.actionOnClickStartButton, this, 1, 0, 0);Here is the git repository : https://github.com/robomatix/click-the-black-squares My code is the line 33 of game/states/menu.js Can someone please help me to do a rollover effect as on the web... Link to comment Share on other sites More sharing options...
robomatix Posted August 21, 2014 Author Share Posted August 21, 2014 I've found an interssting example here : http://updownleftright.net/phaser/bugs/button/ ( https://github.com/photonstorm/phaser/issues/154 ) wich works ( the first button ). I copied the code and use it with phaser 2.0.6 : http://le-carre-noir.net/tests/mouseinmouseout/var game = new Phaser.Game(175, 100, Phaser.CANVAS, null, { preload : function() { game.load.spritesheet('button', 'button.png', 50, 50); }, create : function(game) { game.add.button(25, 25, 'button', function(self) { }, this,1,0,2); }});It dosen't work... Do you think that might be a bug ? Link to comment Share on other sites More sharing options...
robomatix Posted August 22, 2014 Author Share Posted August 22, 2014 Yes, it's a bug in the v 2.0.6 someone told me on an another forum. It's fixed in the v 2.0.7. You can see it here : http://le-carre-noir.net/tests/mouseinmouseout207/ Link to comment Share on other sites More sharing options...
Recommended Posts