Tween a Bezier Curve using Tweener

Here’s a demo of the a simple way to draw a bezier curve using Tweener.  Using the Tweener class and the “CurveModifiers” addition to it, I am drawing a bezier curve from one point to another using a control point. It’s pretty simple stuff, but when I was looking for example code, I didn’t find much.  You can use the curveTo function with the same points (start, end, and control) to draw a curve without tweening.

Directions for Demo:  Move the blue (control point) square or the right red square (starting point) and it will draw a bezier curve from that point to the other one.

This movie requires Flash Player 9



Permalink: Tween a Bezier Curve using Tweener


« Back to Code Snippets

Leave a comment

You must be connected to post a comment.