Jump to content
GreenSock

lostatoll

Question about timelinelite

Recommended Posts

H, thanks for the code btw.

 

So say I have a few buttons, and when you roll over them, I trigger a timeline..

_roll.insertMultiple([ new TweenLite(_gear1, .5, {alpha:1, y:16, rotation:"180"}), 
					   		new TweenLite(_gear2, .5, {alpha:1, y:16, rotation:"-180"})], 0, TweenAlign.START, 0); 
		_roll.play();

 

but then when I roll out, I want to reverse it.

_roll.reverse();

 

but, if you roll off of one button and then back onto another quick, it seems to take the starting y value from the gears position after it's already rolled down, instead of returning it to it's original position?

 

also is there a way to add tweens without playing it right away,.. i notice insert multiple plays them as soon as you insert them.

Link to comment
Share on other sites

Are you asking how to pause your timeline initially? Either pause() it after you create it or just pass "paused:true" in the vars object, like:

 

_roll = new TimelineLite({paused:true});

 

Does that answer your question?

Link to comment
Share on other sites

kinda, thanks for the quick reply.. I wasn't clear about the question, sorry.

 

i guess my main problem is that i'm starting something at y:-20, and in the timelinelite, tween it to y:30, but there are multiple buttons that fire the timeline, and when you rol off of those buttons it reverses it. but if i roll off one button and onto another fast enough, of course it never finishes the reversed tween, which is fine as it should be in the over position, but when I roll off that button it doesn't reverse anymore.

Link to comment
Share on other sites

it's cool, i figured it out, well sort of.. i just put an if statement checking if the tween was active, and if it was restarting it.. not sure if it's right or what not but it works.

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