Jump to content
GreenSock

void__

Start nested timeline in one timeline and resume in another?

Recommended Posts

I am trying to create a site loader/unloader by playing a nested timeline via a masterIn timeline, and resuming the nested timeline via a masterOut timeline. When I add the resume to the masterOut timeline, the tween fails to play, however, I am not seeing any console errors.

 

Any guidance would be appreciated.

 

I am also open to suggestions for a more elegant way to code this. I've used separate 'in' and 'out' nested timelines in the past, but always run into glitchy overriding tweens.

 

See the Pen GROeEeZ by brioenzswozlle (@brioenzswozlle) on CodePen

Link to comment
Share on other sites

Hey @void__,

 

Try to toggle a timeline. Here an example.

 

See the Pen rNWWMGz by mikeK (@mikeK) on CodePen

 

Happy tweening ...

Mikel

 

 

  • Like 2
Link to comment
Share on other sites

Thanks mikel, but I am trying to continue the animation on trigger, not reverse.

The idea is to have a sequence of tweens for tlMasterIn (page load), and a separate sequence of tweens for tlMasterOut (page unload), while using the same child timeline (to avoid conflicting tweens)

 

There will also be multiple other child timelines/functions acting in the same manner.

 

But perhaps I am fundamentally wrong about using 2 separate master timelines?

Link to comment
Share on other sites

I'm afraid I'm a bit stumped on what your intention is here. From what I can understand I think Mikel's example is probably the best route.

In terms of conflicting tweens this article helped clear some things up for me - maybe it will help you too?



 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I was approaching this task incorrectly.

I've reread the docs and now have a better understanding.

Thank you both.

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