Jump to content
GreenSock

qarlo

How to jump to label in nested timeline?

Moderator Tag

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

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

Thanks, this works perfectly!

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