Ninjadoodle Posted September 20, 2014 Share Posted September 20, 2014 Hi Guys I ad a look through the documentation and understand that there ate methods to remove / stop tweens. I tried everything but can't figure out how to use them If anybody could help, that would be awesome! Thank you in advance! Quote Link to comment Share on other sites More sharing options...
enpu Posted September 20, 2014 Share Posted September 20, 2014 var tween = new game.Tween(sprite.position); tween.to({x: 100}, 1000); tween.start(); tween.stop(); Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted September 21, 2014 Author Share Posted September 21, 2014 Hi @enpu Thank you for your reply Is there a way I can kill/stop a tween that I didn't set as a variable? For example ... game.scene.addTween(adventurer, {y:320}, 500, {delay:0, easing:game.Tween.Easing.Exponential.In, onComplete:reset}).start(); Or is there a way to kill/stop all tween on an object? Thank you again! Quote Link to comment Share on other sites More sharing options...
enpu Posted September 21, 2014 Share Posted September 21, 2014 Try game.TweenEngine.stopTweensForObject(adventurer); Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted September 21, 2014 Author Share Posted September 21, 2014 Hi @enpu Hmmm, I seem to get ... [Error] TypeError: 'undefined' is not a function (evaluating 'game.TweenEngine.stopTweensForObject(adventurer)')... Quote Link to comment Share on other sites More sharing options...
enpu Posted September 21, 2014 Share Posted September 21, 2014 Sorry game.tweenEngine Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted September 21, 2014 Author Share Posted September 21, 2014 Hi @enpu Thank you! That works I've been trying to get it working on a tweened container (containing body parts) but it doesn't work. I think you have to stop tweens for the individual body parts. Thank you! 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.