Jump to content
Search Community

Do repeated timelines take into account their nested timelines?

ryan_brwn test
Moderator Tag

Recommended Posts

Hello all! Having trouble understanding why something is happening. So I have a minimal demo with timeline that is set to repeat and also has a nested timeline. 

Expected Result
The box moves down, and then to the right in the main timeline (with a repeat set to the timeline) and then in the nested timeline the box scales and changes background colors twice. I would expect the timeline to then repeat this entire sequence in order.

Actual Result
It seems like the repeat set on the main timeline doesn't consider the nested timeline. Also curiously, the full nested timeline doesn't seem to play out fully. It seems as though the repeat is causing the two timelines to conflict.

 

Question
Do repeats set on timelines with nested timelines account for the nested timeline durations/tweens/etc? What is going on and is there a way to get the expected result?

 

 

Thanks so much!!

See the Pen mdQEZbB?editors=0010 by ryankbrown (@ryankbrown) on CodePen

Link to comment
Share on other sites

Heya! So, taking a look and this looks to be a JS/syntax thing.
 

// this calls the function immediately on load ands adds the returned value
.add(nestedTimeline())
// this just calls the function, it's not adding the result of the function to the tl
.add(nestedTimeline1)


See the Pen vYQXgGJ?editors=0011 by GreenSock (@GreenSock) on CodePen

 

I've added some logs in here for you so you can see what's happening, but you're currently just calling the function, it's not actually adding anything to the timeline.

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