Jump to content
Search Community

TimeLineLite-time

un4given test
Moderator Tag

Recommended Posts

Hey,

 

Is there anyway that the tweens inside a timeline can govern their own times?

below I have add the code I am working with. I understand that the 0.2 at the end staggers the tweens but the thing is I need my tweens to start at different times.

 

Am I missing something or is this an impossible task?

 

 

var PageTimeLine:TimelineLite = new TimelineLite();
PageTimeLine.insertMultiple([

	new TweenLite(background2, 0.40, {x:444.9,y:229.7,width:156.2,height:119.2,ease:Sine.easeOut}),
	new	TweenLite(background2, 1, {delay:0.40,overwrite:false,x:52.5,y:25.3,width:940.9,height:718.4,ease:Elastic.easeOut}),
	new TweenLite(hometab, 0.1, {delay:1.40,overwrite:false,x:90.5,y:62.2}),
	new TweenLite(hometab, 0.20, {delay:2,overwrite:false,alpha:100,x:15.4,y:62.2,ease:Sine.easeOut}),
	new TweenLite(animationtab, 0.1, {delay:1.40,overwrite:false,x:97,y:69.5}),
	new TweenLite(animationtab, 0.40, {delay:2,overwrite:false,alpha:100,x:22.1,y:69.5,ease:Sine.easeOut}),
	new TweenLite(illtab, 0.1, {delay:1.40,overwrite:false,x:99.5,y:112.5}),
	new TweenLite(illtab, 1, {delay:2,overwrite:false,alpha:100,x:24.4,y:112.5,ease:Sine.easeOut}),
	new TweenLite(abouttab, 0.1, {delay:1.40,overwrite:false,x:101.8,y:155.8}),
	new TweenLite(abouttab, 1.10, {delay:2,overwrite:false,alpha:100,x:26.9,y:155.8,ease:Sine.easeOut}),
	new TweenLite(contacttab, 0.1, {delay:1.40,overwrite:false,x:104.2,y:187.1}),
	new TweenLite(contacttab, 1.40, {alpha:100,x:29.2,y:187.1,ease:Sine.easeOut})],
						 0,
						 TweenAlign.START
						 0.40);

Link to comment
Share on other sites

Of course! You have complete control over where your tweens get placed with the insert() method. Put them wherever you want. Keep inserting or appending as much as you want. The tweens can overlap or not. There can be large gaps of time between them if you want. Really, there's no limitations (at least none that I can think of). You can even move a tween by altering its"startTime" property. Tons of flexibility.

 

So if you want to insert a tween at exactly 3.1 seconds into myTimeline, do:

 

myTimeline.insert( new TweenLite(mc, 1, {x:100}), 3.1);

 

Hope that clears things up. Check out the documentation at http://www.greensock.com/as/docs/tween/

 

Have fun.

 

PS You don't need to set overwrite:false on all those tweens. TimelineLite automatically inits OverwriteManager which sets the overwite mode to AUTO. Be very careful about setting overwrite:false because you're telling the engine to turn off all its features that prevent conflicting tweens.

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