download source

To use the generator, drag the handle points at the bottom of the movie (in orange) or enter their position manualy in the fields provided (warning: dragging may be slow). Then just copy the function for pasting and use it as you normally do (tween engine, etc.).

Although each handle point modifies the curve, their are numbered to show which portion of the curve they influence the most. Handle point 1 controls the left part of the curve and handle point 4 controls the right part. I may try to do a nicer interface one of these days to illustrate this fact.

To view a sample of the motion, click on the ball to activate it and then click anywhere for the ball to move using the current easing style. You can change the number of frame per tween in the field provided.

Notes:

  1. Entering decimal values in the fields is a bit tricky: enter at least 2 digits and THEN insert the decimal period in the middle.
  2. Drag the point to get a feel for the curve and then modify the points' location by hand to make them less complicated. I mean turn 2.132654 into 2.13 :).
  3. Do NOT modify the polynomial coefficient unless you know what you are doing (that is you know beforehand how the polynomial curve would look like with your coefficients). Changing the values, even a little, would screw up the result completely (the curve would show it right away). The only time you should do it is when the function shows one of its coefficient as 2.134000000001 or 2.13499999999998. In this case, you can remove the trailing part and round appropriately.
  4. The code in the function is not optimized with use of the local variables. For instance in quintic shows as
        var ts:Number=(t/=d)*t;
        var tc:Number=ts*t;
        return b+c*(tc*ts);
    But in this case, it'd probably be better like this (as in Robert Penner's formula):
        return b+c*((t/=d)*t*t*t*t);
    Take a look at the function and modify yourself if need be. Note that this is not critical, the only important things are the polynomial coefficients.
  5. To test the generated function, you can do the same as with Robert's functions, make sure calling the function as f(0, 0, 1, 1) returns 0 and f(1, 0, 1, 1) returns 1.
  6. To have a zero velocity start and/or zero velocity end, set P1 at 0 and/or P4 at 1 respectively.
  7. For those of you interested, this gadget was created after I gave a presentation on dynamic motion during the flashmove user group in singapore on the 19. My presentation is available here.

 

History:

 

Any comments/question, please feel free to email me.