Jump to content

How to slow down a tween animation


Recommended Posts

I'm going to face a problem in my project where I wish to slow down active tweens based on dynamic conditions. From what I've found I could either use tween's `generateData()` or `pause()` and `resume()` to achieve this. However pausing and resuming might cause a lag-like effect, and `generateData()` requires me to reinvent tweens to a certain degree, plus if I wish to half the speed I need to generate in 120fps for instance, which might cause more unnecessary processing power when it's not needed.


Does anyone have any input regarding these solutions, or know a better one fitting my needs? Basically I need to slow down the animation of a tween so that the callback gets delayed and so on.

Link to comment
Share on other sites

  • 2 weeks later...

Yes, you have to listen for the onPause event. You can pause everything in tweenmax with TweenMax.pauseAll(). But I remember that I had some problems with timelines so I used 'globalTimeScale' instead. With this nothing gets paused, instead the time scale will actually be set to a very very small number as 0 is not allowed and the tweens will run very very very slow- like they are paused. But maybe you're not using timeline's at all- in this case try tweenmax#pauseAll first.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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