You want to draw Cubic Bezier curves in Flash?
29 December , 2006Posted by on
If you want to draw some cubic Bezier curves in Flash, at the moment it is not really possible. That’s the reason why I did some search work to find a good way to really draw some cubic beziercurves in Flash. I good starting point is (as most of the time ) Wikipedia (which was in our Belgium news today). The article I want to point is located at http://en.wikipedia.org/wiki/Bezier_curve .
There are several methods to draw a Cubic bezier curve in Flash as explained into this (old) article: http://timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm
I made some example application where I use the following expression to calculate the cubic bezier curve . I do this for the X and Y coordinate of the point on the curve.
I made some code example similar to the wikipedia C++ example in actionscript wich you can download here. It is made for clarity and can be a lot more optimized. If you have questions about it, feel free to comment about it !
UPDATE : I forgot to mention the example is build in the new FlashDevelop 2.0.2 and it all went very smooth, thanx to the FlashDevelop team to build such a wonderfull tool 😉