Jump to content


Calling timeline function in the middle of another timeline

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

I'm trying to get my flicker animation to start after the opacity part of the tl tween. Problem is I can't just append it to the end, because I've got more tl tweens running while the flicker animation is happening. As you can see in the tween, it doesn't look like my function is firing at all. Any ideas?


Codepen updated: 

See the Pen YyoyLz by kathryncrawford (@kathryncrawford) on CodePen

Link to comment
Share on other sites

Hello kathryn.crawford,


That is due to the onComplete showing flick:

onComplete: flick

instead of flicker, the name of your function

onComplete: flicker

Try this:


See the Pen BogjZY by jonathan (@jonathan) on CodePen



Link to comment
Share on other sites

Hi Kathryn :),


On your tl2 timeline, the staggerTo is going to an opacity of 1, but all the images are already at 1. If you set it to something like 0.5, it flickers.


See the Pen yYdOMY by PointC (@PointC) on CodePen

  • Like 2
Link to comment
Share on other sites

Oh - and the stagger time was also missing (defaults to 0 )so everything was flickering at the same time rather than staggering. :)

Link to comment
Share on other sites

Very nice Diaco and congratulations on your 1,000th post. :)

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