Jump to content
GreenSock

Provem Digital GmbH

Position Paramater not working when nesting multiple Timelines into one Mastertimeline

Go to solution Solved by GreenSock,

Recommended Posts

Hi GSAP-Community,

 

I hope that someone can help me out. I'm fighting for some hours with a problem. I'm working with multiple timelines that are beeing created by seperate functions that return a timeline. Then I'm adding them into the mastertimeline with the .add method. I want to start the first and the second animation at the same time, but nothing works, I already have read all documentations.

 

These two i would like to start at Position Parameter 0:

mainTimeline.add(box1_2(),0);
mainTimeline.add(benefit_paragraph(),0);

 

Best regards,

David

See the Pen vYrWzQd by davidprovem (@davidprovem) on CodePen

Link to comment
Share on other sites

  • Solution

Your position parameter is correct. The problem I see right away is that you're creating logic problems by using nested ScrollTriggers. That's one of the common mistakes. An animation's playhead cannot be controlled both by a parent timeline and the scrollbar position - those could be going in completely different directions simultaneously. 

 

You can apply a ScrollTrigger to the parent timeline - that's fine. But you cannot have a bunch of nested ScrollTriggers. Again, it's not a limitation of the tools - it's literally a logic issue where it'd be impossible. 

  • Like 1
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.
×