Replace the word public with the word static =)
static function exactCurveTo(mc:MovieClip, startX:Number, startY:Number, curveX:Number, curveY:Number, endX:Number, endY:Number):Void {
with (mc) {
X = (startX+endX)/2;
Y = (startY+endY)/2;
moveTo(startX, startY);
curveTo(X+(curveX-X)*2, Y+(curveY-Y)*2, endX, endY);
}
}
Usage:
exactCurveTo(this, 10, 10, 400, 100, 540, 390);
Try it out with draggable points.
