Jump to content
Search Community

Best way to get inactive Timelines?

shifty test
Moderator Tag

Recommended Posts

I've used TimelineMax.getActive(false, false, true) to get the top level child Timelines that have played in my main Timeline. What's a good way to get the rest?

 

For example, if a Timeline consists of [A, B, C, D, E] child timelines, and C is currently playing, I'd like to get my hands on just [D, E] (the getActive method would give me [A, B, C]).

Link to comment
Share on other sites

Yep. Here are a couple of options:

 

1) Use the new 4th parameter in getChildren() (added today) that allows you to have it ignore children with startTimes before a certain point. Snag those and then iterate through them and find out which ones have their "active" property set to false.

 

2) Use getChildren() and then iterate through all children and pull out what you need. Compare each one to see if it's in the Array that getActive() returned. I know it's not pretty, but it should work fine.

 

Get the latest update at http://blog.greensock.com/v11beta/

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