Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sandeep

how to do next and previous in TimelineMax

Recommended Posts

Hi,

 

Let me congratulate GreenSock for the hard work and success.

 

My question is, how to do next and previous in TimelineMax. ?

 

I am able to play,pause,reverse and resume but how to go to the next/previous frame of the animation?

 

any help will be highly appreciated.

Edited by Sandeep
Link to comment
Share on other sites

To be clear, the default mode in GSAP is time-based, not frames-based. That's a very good thing because it ensures that timing is consistent even if the CPU gets bogged down. However, if you set useFrames:true on your TimelineMax, then it is indeed frames-based. You could iterate through the frames with seek() or pause() like:

 

tl.pause(); //pause it once, then use seek()
tl.seek( tl.time() + 1); //goes forward one frame
tl.seek( tl.time() - 1); //goes backward one frame

 

Does that answer your question?

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.
×