chrisgannon Posted November 12, 2019 Share Posted November 12, 2019 I have a parent timeline. I have a child timeline that I've added to the parent timeline. Both play at the same time. The child timeline has labels. I need to get the time associated with a child label so I can tell the parent timeline to go to that time. I think getLabelTime did that but it's no longer part of the 3.0 API? Is there another way? Link to comment Share on other sites More sharing options...
chrisgannon Posted November 12, 2019 Author Share Posted November 12, 2019 Ok I think I have found a solution. myTimeline.labels returns an object whose keys are the label name and whose properties are their time. E.g. {labelName:12, otherLabelName: 23} So if you want the parent timeline to play from the child timeline's previous label you could write something like: parentTl.play( childTl.labels[childTl.previousLabel()] ); 4 Link to comment Share on other sites More sharing options...
Learning Science Posted February 27, 2020 Share Posted February 27, 2020 thanks Chris, just found this super useful and saved me loads of time! 1 Link to comment Share on other sites More sharing options...
Carl Posted February 27, 2020 Share Posted February 27, 2020 Hello. For more advanced senarios there Is a helper function to get a nested label’s time relative to a parent timeline https://greensock.com/docs/v3/HelperFunctions 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now