Jump to content
GreenSock

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

TimelineLite / TimelineMax .add() with Stagger

Recommended Posts

Simple question regarding TimelineLite / TimelineMax .add() with Stagger:

 

Is it necessary to do this:

tl.add([tween, tween, tween], "+=5", "normal", "stagger", 5); // shown in documentation example

 

or would you do this:

tl.add([tween, tween, tween], "+=5, "normal", 5); // what I would expect to do

Link to comment
Share on other sites

Hi,

 

Sorry for the confusion. The second way is correct.

 

I just looked at the JS docs and could not find the example you are referencing. Would you mind pasting a link to the exact section?

 

*note: the docs are in a frameset, so if necessary click the "no frames" link at the top to get the url. 

 

Again, sorry for the confusion, we'll fix it once we know where it is.

 

Thanks.

Link to comment
Share on other sites

ok, I see the trouble.

 

First, you had posted that the docs contained:

 

tl.add([tween, tween, tween], "+=5", "normal", "stagger", 5); //

 

 

I looked for the "normal" and "stagger" doubled-up like that and it couldn't find it.

 

But, yes, you are correct in that the docs had an error. They showed:

 

BAD

 

tl.add([tween1, tween2, tween3], "+=2", "stagger", 0.5);

 

 

GOOD

 

 

tl.add([tween1, tween2, tween3], "+=2", "sequence", 0.5);

 

"stagger" is not a valid align value. "stagger" is the name of the 4th parameter. It was just a mistake our end.

 

 

So again, my apologies for the confusion. The docs are updated now. Thanks for pointing it out.

 

---

 

I don't know if that clears up your other issue, but just to be clear, the position parameter must always precede the align parameter.

 

Stick to the updated docs and you should be good;)

 

If you need any other help, don't hesitate to ask.

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