Jump to content
GreenSock

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

How to jump to label in nested timeline?

Go to solution Solved by Diaco,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello,
I'm trying to use the method seek() to jump to a label in a nested timeline.

 

The real example is a bit complex to reproduce in a codepen so I constructed a useless one just to show the issue.

 

Baically I have a series of small animation contained in a another animation. This animation (the external one) has a duration equal to all the small animations inside. I would like to be able to jump to each of these animations, but apparently I can't.

I'm sure there's a good reason for this, but is there any way to achieve what I'm trying to do?

See the Pen RoQEqY by qarlo (@qarlo) on CodePen

Link to comment
Share on other sites

  • Solution

Hi qarlo :)

 

pls try these methods : 

See the Pen vydbbB by MAW (@MAW) on CodePen

  masterTl.seek( childTl.getLabelTime('labe') ); // if childTl added and start from time '0' in master timeline
  masterTl.seek( childTl.startTime()+childTl.getLabelTime('labe') ); // if childTl position in another time in master Tl
  • Like 5
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.
×