Jump to content
Search Community

pause with easing [SOLVED]

igorf test
Moderator Tag

Recommended Posts

I use one tween (tweenmax) to smoothen the scroll of a big image across the screen.

This works perfectly ,but I'd like to smoothen the pause as well, so that a pause doesn't stop the tween immediately, but smooths it with a small ease before pausing.

Is that possible, maybe with TimelineMax? I already tried a lot but with no result.

Link to comment
Share on other sites

There are several ways to accomplish that sort of thing:

 

1) tween the timeScale and then use an onComplete to pause it, like:

 

TweenLite.to(myTween, 0.5, {timeScale:0.01, onComplete:myTween.pause});

 

2) tween the currentTime with an ease, like:

 

myTween.pause();
TweenLite.to(myTween, 0.5, {currentTime:"0.5"});

 

Happy tweening :)

Link to comment
Share on other sites

  • 2 weeks later...

Thanks Jack,

 

the first solution worked perfectly for me.

But if other users want to try it: the code-sample uses TweenLite, but the timeScale-property is only part of TweenMax, so use that one instead.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...