Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Better control of object speed?

Recommended Posts

I'm going to do the best I can to explain myself here.


I've noticed that a lot of object tweens have a basic movement then simply ease to a stop before starting a new movement. Eases are a simple in and out that start an object from a zero speed and end on a zero speed. Is there a simple way to:


-have and object quickly appear in and move (30px for example)

-and then instead of an ease requiring that object to stop before another animation is placed on it,

just slowly pickup at the end of that 30px and move another 50px at a slow pace.


I guess it's that transition between movements that I want to learn to control, and have be very fluid. If there's someone that has a simple example that they can refer me to I would be very appreciative. Is this Trig that I'm starting to get into? Sine, CoSin and the such? If you need a better explanation just ask and I'll do my best. Thanks in advance for any help.



Link to comment
Share on other sites

You might want to look into CustomEase: http://www.greensock.com/customease/


Otherwise, you could just sequence two tweens (not sure how you want it to transition between the two):


TweenLite.to(mc, 1, {x:30});
TweenLite.to(mc, 3, {x:50, delay:1, overwrite:false, ease:Linear.easeNone});


Other options are:


1) Use the physics2D or physicsProps plugins to define a particular velocity


2) Use the timeScale property of the tween itself. You can even tween the timeScale of a tween with another tween.


var tween:TweenMax = new TweenMax(mc, 2, {x:50});
TweenMax.to(tween, 1, {timeScale:0.2, delay:1});


Lots of options :)

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.