Jump to content
Search Community

siangi

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by siangi

  1. Hi everyone

     

    I'm using GSAP to animate the lyrics of a song. For that I am trying to use nested timelines. I create the animation in their own timelines in separate functions, to reuse them later. These timelines are returned and added to a base timeline. However if I do that, only the last sub-timeline added executes.

    You can switch out lines 26 and 27 in the codepen to test it out. On their own, both sub-timelines work.

       // switch these lines to try out the different functions
        // only the last line will be exectued
        baseTimeline.add(setUpCrossingLines("testTextTestTextTestText"), "<");
        baseTimeline.add(setUpFlag(flagLines), "<"

     

    Am I handling the timelines wrong?

    Thanks for any tips or help.

     

    See the Pen eYGKBNy by siangi (@siangi) on CodePen

×
×
  • Create New...