# Generate easing using as

**URL:** <https://forum.kirupa.com/t/generate-easing-using-as/303859>\
**Category:** Uncategorized\
**Created:** [January 28, 2010, 11:46am UTC](https://forum.kirupa.com/t/generate-easing-using-as/303859 "2010-01-28T11:46:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxelcat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/maxelcat/32/2854_2.png) [@maxelcat](https://forum.kirupa.com/u/maxelcat)\
**Post date:** [January 28, 2010, 11:46am UTC](https://forum.kirupa.com/t/generate-easing-using-as/303859/1 "2010-01-28T11:46:35Z")

</div>

Hi all

I have a small mask that I need to animate across the stage in response to clicking various buttons. It has to go a different distance each time depending on which button is clicked along the x axis. I can get at the starting and ending x co-ordinates.

I need to develop a set of x cordinates so that the mask starts moving fast and slows down as it gets nearer - kind of like the easing effect. I figured using some sort of simple 1/x^2 expression and have spent an hour or so fiddling in excel. Trouble is its a LONG TIME since I did maths, and I can’t remember what formula to use. Have tried google with “parabola”, “simple curves” etc etc

I could do this by making a number of dummy mcs and puttin the mask in them as required, but would rather not if I can use AS

Any one got any ideas

thanks in advance

Edward
