Custom Ease Builder – Easing Made Easy
DESCRIPTION
Sometimes the standard easing equations (Elastic, Strong, etc.) don't give you quite what you want. This tool allows you to interactively draw a curve for your own custom easing equation and it even writes the code for you. Just copy and paste it into your AS3 or AS2 application. The code it writes requires the com.greensock.easing.CustomEase class which is a membership benefit of Club GreenSock.
USAGE
Once you create your custom ease there are a few ways you can refer to your custom easing equation. Here are a few options:
-
import com.greensock.easing.CustomEase;
-
import com.greensock.TweenLite;
-
-
CustomEase.create("myCustomEase", [{s:0,cp:0.394,e:0.644},{s:0.644,cp:0.894,e:1}]); //do this only once for each custom ease you want to create.
-
-
//then later...
-
TweenLite.to(mc, 2, {x:"250", ease:CustomEase.byName("myCustomEase"), delay:1});
Or to speed things up slightly, you could store a reference to the easing function instead of calling the CustomEase.byName() function each time:
-
import com.greensock.easing.CustomEase;
-
import com.greensock.TweenLite;
-
-
var myEase:Function = CustomEase.create("myCustomEase", [{s:0,cp:0.394,e:0.644},{s:0.644,cp:0.894,e:1}]); //do this only once for each custom ease you want to create.
-
-
//then later...
-
TweenLite.to(mc, 2, {x:"250", ease:myEase, delay:1});
Or if you prefer to keep track of the CustomEase instance instead, you can reference its easing function with the "ease" property, like:
-
import com.greensock.easing.CustomEase;
-
import com.greensock.TweenLite;
-
-
var myEase:CustomEase = new CustomEase("myCustomEase", [{s:0,cp:0.394,e:0.644},{s:0.644,cp:0.894,e:1}]); //do this only once for each custom ease you want to create.
-
-
//then later...
-
TweenLite.to(mc, 2, {x:"250", ease:myEase.ease, delay:1});
FAQ
- I don't see a download link? Where do I get the CustomEase class?
The com.greensock.easing.CustomEase class comes with your memebership to Club GreenSock. When you join, you'll get a confirmation e-mail with a link to download the bonus classes. - Does this tool write code that's compatible with other tweening engines?
It sure does. It follows the standard format for easing equations, accepting 4 parameters: time, start value, change in value, duration. You should be able to use it with virtually any tweening engine. - Is there an AS2 version of CustomEase available or is it only built in AS3?
Just like my tweening classes, there are AS2- and AS3-compatible versions of CustomEase. They work EXACTLY the same. The interactive tool is built in AS3, but the code it generates is compatible with both.
Need help?
Feel free to post your question on the forums. You'll increase your chances of getting a prompt answer if you provide a brief explanation and include a simplified FLA file (and any class files) that clearly demonstrates the problem.
Comments (14)

Now this is a class I can get into thanks alot for this Jack. I’ll help spread the word
http://blog.kreativeking.com/2008/08/new-class-from-jack-aka-mr-greensock/
Jack,
What’s wrong with you? Are you human? This is genius.
THANK YOU!
John
Jack.. this is damn Cool..! too Good
Fantastic Jack – just fantastic.
Great idea and great use of the Greensock Member program. I really feel I’m getting my moneys worth.
great tool, it’s amazing
Thank you !
S.
Super cool Jack, thanks for tweaking this great framework, again again!
with this great tool you have one more club member and I’m really looking forward using your transform classes
Totally amazing work!
It really helps me a lot!
You’re the man, Jack. Thanks for continuing to add excellent tools to our member’s collection–it is sooo worth it to join the club.
This is one of the slickest apps I have seen – very sharp and very helpful. Thank you so much for sharing!
Fantastic!!! Great job!
Nice job!
I was looking for something like this for quite a while.
This is great code and well worth the money,
Cheers Jack
Someone should start publishing some custom tweens they’ve built… Great work Jack!







