Jump to content
Search Community

getLabelTime in 3.0?

chrisgannon test
Moderator Tag

Recommended Posts

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

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()] );

 

 

 

  • Like 4
Link to comment
Share on other sites

  • 3 months later...

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