Jump to content
GreenSock

garyw

How to stagger delayedCall?

Go to solution Solved by GreenSock,

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

Is there an easy way to use GSAP to stagger a series of delayedCalls to the same callback function, optionally passing different parameters each time (ala cycle)?  Or do I need to create my own loop to do this one at a time?

Link to comment
Share on other sites

Good question but a loop will be the best and easiest approach.

In order to use stagger you would need an Array of things to tween.

Link to comment
Share on other sites

  • Solution

Here's another sneaky way to do it:

//calls yourFunction 5 times, with 0.25 seconds between each:
TweenMax.to({}, 0.25, {onRepeat:yourFunction, repeat:5});

:)

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