nuvorm Posted July 6, 2014 Share Posted July 6, 2014 I am currently trying to get mouseevents working on a sprite with a graphic as a child. Is this even possible? It does not seem to work. basically doing this var sprite=new Phaser.Sprite(this.game,0,0); sprite.inputEnabled = true; sprite.input.useHandCursor = true var ptn=new Phaser.Graphics(this.game, 0,0); this.addChild(sprite); sprite.addChild(ptn); sprite.x=320 sprite.y=240 ptn.lineStyle(4, 0x0000FF, 1); ptn.moveTo(0,0); ptn.lineTo(800,-800); sprite.events.onInputDown.add(this._onMouseDown, this); the sprite is only clickable for a square of 100px x 100px any thoughts? Wouter Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.