Share Posted December 27, 2013 Hi I'm using ThrowPropsPlugin to animate a sprite called imageContainer: The code I'm using is from the ThrowPropsPlugin example found here: http://www.greensock.com/throwprops/ Example: ThrowPropsPlugin.to(imageContainer, {throwProps:{ y:{velocity:yVelocity, max:maskBounds.top, min:maskBounds.top - yOverlap, resistance:300}, x:{velocity:xVelocity, max:maskBounds.left, min:maskBounds.left - xOverlap, resistance:300} }, onUpdate:scrollUpdate, onComplete:scrollEnd, ease:Strong.easeOut }, 10, 0.3, 0); Is there a method I can call on TweenLite that forces the animation to end instantly but still places my imageContainer where it was heading within the bounds? Any help appreciated! Thanks Rolf Link to post Share on other sites
Share Posted December 27, 2013 Hi Rolf, Welcome to the GreenSock forums. Yes, ThrowPropsPlugin.to() returns a TweenLite instance to () method public static function to(target:Object, vars:Object, maxDuration:Number = 100, minDuration:Number = 0.25, overshootTolerance:Number = 1):TweenLite So in your case you should be able to just create a reference to your tween like so var throwTween = ThrowPropsPlugin.to(imageContainer, {throwProps:{y:{velocity:yVelocity, max:maskBounds.top, min:maskBounds.top - yOverlap, resistance:300}, x:{velocity:xVelocity, max:maskBounds.left, min:maskBounds.left - xOverlap, resistance:300} }, onUpdate:scrollUpdate, onComplete:scrollEnd, ease:Strong.easeOut }, 10, 0.3, 0); and then later if you want to force that tween to finish throwTween.progress(1); Let us know if you need more help 1 Link to post Share on other sites
Author Share Posted December 27, 2013 Hi Carl It worked perfectly Thanks, much appreciated! Rolf 1 Link to post Share on other sites