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:

- Entering decimal values in the fields is a bit tricky: enter at least 2 digits and THEN insert the decimal period in the middle.
- 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 :).
- 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. - 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. - 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.
- To have a zero velocity start and/or zero velocity end, set P1 at 0 and/or P4 at 1 respectively.
- 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:

- 20/09/2003: created
- 22/09/2003: published
- 23/09/2003: code clean-up, move the as function formatting out of the getBezierFunc function
- 26/09/2003: code clean-up, adjust movie clip and textfield's names index to match bezier points index (much cleaner in code). Modify the plotter to use drawing API (much faster during dragging), Flash 5 style plotter is still in library for historical reference :)

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