obliviot Posted April 8, 2018 Share Posted April 8, 2018 Hi all, I am trying to get mousedown and up to work with text object this.found_word = word; this.word = new game.Text(this.found_word.toUpperCase(),{ align: 'center' }); this.word.anchor.set(this.word.width / 2, this.word.height / 2); this.word.position.set(game.width / 2, game.height / 2 + 345); this.word.scale.set(1.5); this.word.addTo(this.stage); this.word.mousedown = this.mousedown.bind(this); this.word.mouseup = this.mouseup.bind(this); }, mousedown: function() { console.log('mouse down'); this.word.scale.set(.5); }, is this at all possible this way? Quote Link to comment Share on other sites More sharing options...
PsichiX Posted April 9, 2018 Share Posted April 9, 2018 hi, just some tip: put long code into code field to make it easier to read obliviot 1 Quote Link to comment Share on other sites More sharing options...
enpu Posted April 9, 2018 Share Posted April 9, 2018 try to make the object interactive: this.world.interactive = true; obliviot 1 Quote Link to comment Share on other sites More sharing options...
obliviot Posted April 9, 2018 Author Share Posted April 9, 2018 Thank you sir!! Worked like a charm. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.