Jump to content
Search Community

Easing for a timeline. [SOLVED]

evolutionx test
Moderator Tag

Recommended Posts

Hi guys!

 

I've come up with an interesting question today. :D

 

I have some sequenced tweens here: http://www.arcticum.eu/uus (the 360 turning)

Currently they are timed with delays and onCompletes.

 

I was wondering if, in order to make the whole thing smoother, it is possible to:

 

1) use Linear.easeNone for the current tweens

2) then group these tweens into a TimelineMax and then

3) play and use Regular.easeOut on this whole Timeline?

 

clipboard_upped.png

 

How is it doable?

 

Cheers,

Martin

 

PS - still using TweenMax v10 at the moment

Link to comment
Share on other sites

Absolutely. That's one of the great things about the new TimelineLite and TimelineMax classes. Seriously, once you use them a few times, you'll be addicted. I keep hearing from users who say stuff like "Dude! The TimelineLite/Max stuff is amazing - I'm addicted. I can't imagine living without them now. I'll never animate in the Flash IDE again." :)

 

All you'd have to do is put your tweens into a TimelineLite or TimelineMax, make sure they use a Linear.easeNone ease, pause the timeline, and then tween its currentTime property, like:

 

var myTimeline:TimelineLite = new TimelineLite({paused:true});
myTimeline.append( new TweenLite(mc, 1, {x:100, ease:Linear.easeNone}) );
myTimeline.append( new TweenLite(mc2, 1, {x:200, ease:Linear.easeNone}) );
//here's the cool part:
TweenLite.to(myTimeline, 2, {currentTime:2, ease:Strong.easeOut});

 

TimelineMax even has a tweenTo() method that makes it easy to tween from wherever the timeline is to any other time (or label) on the timeline, like myTimeline.tweenTo(2, {ease:Strong.easeOut});

 

And if you want to make it a bit more dynamic so that you don't need to remember the duration numbers, you can just use the "duration" property for the length of the tween, like:

 

TweenLite.to(myTimeline, myTimeline.duration, {currentTime:myTimeline.duration, ease:Strong.easeOut});

 

Have fun. Oh, and make sure you're using the latest version from http://blog.greensock.com/timelinelite/

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