bigtunacan Posted April 18, 2015 Share Posted April 18, 2015 I would like to create a tween on a sprite that occurs when the player clicks on it. I have enabled input and drag on the sprite, but now I would like to add a callback function that performs the tween.sym_cloud_blue.inputEnabled = true;sym_cloud_blue.input.enableDrag(); Link to comment Share on other sites More sharing options...
rich Posted April 19, 2015 Share Posted April 19, 2015 sprite.events.onInputDown.add(runTween, this); ... function runTween(sprite) { // do it } Link to comment Share on other sites More sharing options...
bigtunacan Posted April 19, 2015 Author Share Posted April 19, 2015 Thanks Rich. Haven't been working with Phaser long, but really enjoying it so far. Keep up the good work! Link to comment Share on other sites More sharing options...
jdnichollsc Posted April 20, 2015 Share Posted April 20, 2015 Rich, I think that you should have a list of the most common questions in the forum. Regards, Nicholls Link to comment Share on other sites More sharing options...
Recommended Posts