/* CurveThru v1.1 Oct. 29, 2002 (c) 2002 Robert Penner MovieClip methods to draw a quadratic bezier (three control points) through a given point.. Dependencies: _xpen and _ypen movie clip properties (drawing_api_core_extensions.as) The _xpen and _ypen properties are discussed in Chapter 10 of Robert Penner's Programming Macromedia Flash MX http://www.robertpenner.com/profmx http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20 */ MovieClip.prototype.drawCurve3Pts = function (x1, y1, x2, y2, x3, y3) { var cx = 2*x2 - .5*(x1 + x3); var cy = 2*y2 - .5*(y1 + y3); this.moveTo (x1, y1); this.curveTo (cx, cy, x3, y3); }; MovieClip.prototype.curveToThru = function (px, py, ax, ay) { var cx = 2*px - .5*(this._xpen + ax); var cy = 2*py - .5*(this._ypen + ay); this.curveTo (cx, cy, ax, ay); };