Jump to content
Search Community

No repeats in nested timeline when seeking master timeline

saar62097 test
Moderator Tag

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

Hey all

 

I have a repeating timeline nested inside a master timeline. When I play the master timeline all the repetitions of the child timeline are executed, but when I seek the master timeline there is only 1 execution.

 

See the Codepen: press play and you will see a counter step from 0 to 5. But click the button to seek, and the counter goes only to 1.

 

Any ideas or elegant workarounds?

 

thnx in advance,

Sa'ar

See the Pen VGWjKN?editors=1111 by saar62097 (@saar62097) on CodePen

Link to comment
Share on other sites

It looks like you're expecting event callbacks to fire many times on a single event, but that's not how it works. If your goal is to have a function called at a particular time in a timeline when the playhead moves past it in either direction (forward or backward), use a regular call() or addCallback() on the timeline. 

  • 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.
×
×
  • Create New...