x2l2 Posted July 19, 2014 Share Posted July 19, 2014 I made a little test with yeoman generator... I use createMultiple to create 30 objects and use :Game.prototype = { create: function () { this.cards = this.add.group(); this.cards.createMultiple( 30, 'card'); this.cards.setAll('inputEnabled',true); this.cards.setAll('input.useHandCursor',true); ...that works without problem, I can set an event and it make all that i want , but them in try this :Game.prototype = { create: function () { this.cards = this.add.group(); this.cards.createMultiple( 30, 'card'); this.cards.setAll('inputEnabled',true); this.cards.setAll('input.useHandCursor',true); this.logo = this.add.sprite( 0,0 , 'logo'); this.logo.inputEnable = true; this.logo.input.useHandCursor = true; this.logo.onInputDown.add( this.something, this); ...and get errors like :Uncaught TypeError: Cannot set property 'useHandCursor' of null Uncaught TypeError: Cannot read property 'add' of undefined what the hell is going on? Link to comment Share on other sites More sharing options...
x2l2 Posted July 19, 2014 Author Share Posted July 19, 2014 ok i found the problem .... this.logo.inputEnabled = true; Link to comment Share on other sites More sharing options...
Recommended Posts