Jump to content
Search Community

Sequencing in Timeline(lite)

robertnyc test
Moderator Tag

Recommended Posts

Two quick questions:

 

1) Let's say I have a sequence of tweens that I want to insertMultiple into a TimelineLite/Max (tll/m). I want the start of the tweens to stagger, so let's say tween 1, staggertime, tween 2, staggertime, tween3, staggertime, tween4.

 

But let's say I want tweens 2 and 3 to start at the same time. Everything else the same. What's the most efficient way to accomplish this? That is -- to have one tween in a staggered sequence not push the rest of the tweens forward, to have _it's_ staggertime ignored? I could add it at the end of the tll/m and then muck about with a negative delay, or leave it out of the insertMultiple and then insert it at a certain time in the tll/m, but is there a better way?

 

2) I know this is simple -- but when you set align in tll/m constructor's special properties, the docs say that if you change the time of one tween the others aren't respected (or something to that effect). As I read the docs, when you have a sequence of tweens, under some conditions changes in the lengths of one tween will push the others back/forward, under other circumstances this won't happen. I cop to being unclear on this (I have rewatched the helpful video) -- what's the rubric?

 

BONUS QUESTION: how do you get the current start time of a Tween in a tll/m sequence? That is, if I insert multiple a bunch of tweens, and then later want to get the start time of tween 2, for example, to add a label there, etc. Of course I can keep track of the time in another variable, but is there a way to query the tll/m for this info?

 

Thanks for great work!

Link to comment
Share on other sites

1) Let's say I have a sequence of tweens that I want to insertMultiple into a TimelineLite/Max (tll/m). I want the start of the tweens to stagger, so let's say tween 1, staggertime, tween 2, staggertime, tween3, staggertime, tween4.

 

But let's say I want tweens 2 and 3 to start at the same time. Everything else the same. What's the most efficient way to accomplish this? That is -- to have one tween in a staggered sequence not push the rest of the tweens forward, to have _it's_ staggertime ignored? I could add it at the end of the tll/m and then muck about with a negative delay, or leave it out of the insertMultiple and then insert it at a certain time in the tll/m, but is there a better way?

 

There are lots of ways to do this:

 

1) Leave one of the "stacked" tweens out of the insertMultiple (one of the two that you want to start at the same time) and insert() it manually at whatever time you want.

 

2) Put your two tweens into a TimelineLite and use that TimelineLite in the insertMultiple() instead of the two individual tweens. TimelineLites/Maxes can be nested as deeply as you want.

 

2) I know this is simple -- but when you set align in tll/m constructor's special properties, the docs say that if you change the time of one tween the others aren't respected (or something to that effect). As I read the docs, when you have a sequence of tweens, under some conditions changes in the lengths of one tween will push the others back/forward, under other circumstances this won't happen. I cop to being unclear on this (I have rewatched the helpful video) -- what's the rubric?

 

The "align" mode that you pass in through the constructor ONLY applies to tweens that you pass in through the constructor with the "tweens" special property. It does NOT have ANY affect on tweens that are appended/inserted/prepended to it after being created. If you are not passing an array of tweens into the constructor, never, never use the align special property. Well, you can - it won't hurt anything, but don't expect it to control how the rest of your tweens interact with each other. Basically when the constructor runs, it looks for the "tweens" special property in the vars object and if it finds one, it calls insertMultiple() and passes the "align" mode to that function as the 3rd parameter, that's all.

 

BONUS QUESTION: how do you get the current start time of a Tween in a tll/m sequence? That is, if I insert multiple a bunch of tweens, and then later want to get the start time of tween 2, for example, to add a label there, etc. Of course I can keep track of the time in another variable, but is there a way to query the tll/m for this info?

 

It's really easy to find out a tween's start time:

 

myTween.startTime

 

:)

 

Have fun.

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