costa Posted April 26, 2015 Share Posted April 26, 2015 Hello! I have a button: module.exports = { //this is browserify and it works - ok init: function() { close = game.add.button(w/1.47, h/1.272, 'close', this.close, this, 2, 1, 0); close.fixedToCamera = true; close.inputEnabled = true; }, close: function() { alert('asd') close.key = 'img/profile/closePress.png'; }}; I don't understand why it doesn't work I will really appreciate your answer! Thank you =) Link to comment Share on other sites More sharing options...
rich Posted April 26, 2015 Share Posted April 26, 2015 You don't need to inputEnable a Button - they already are. I suspect the reason it doesn't work is that you can't have a variable and a function with the exact same name. Rename one or the other. Link to comment Share on other sites More sharing options...
Recommended Posts