PDA

View Full Version : how to find a point on a curve drawn using curveto function?


arun vallappan
08-05-2007, 10:44 PM
Hi,
the following code draws a curve from (fromX,fromY) to (toX,toY)
using (contX,contY) as control points.

drawingsurface.graphics.moveTo(fromX,fromY);
drawingsurface.graphics.curveTo(contX,contY,toX,to Y);

now,in this curve i need to put an arrow,for that i need a point through
which the curve passes.how do i find it?
can anyone help me?
Thanx,,

Arun vallappan

hangalot
08-05-2007, 11:59 PM
i use the beziertools class written by alex uhlman for animation package for this

arun vallappan
08-06-2007, 09:11 AM
Hi,
Thnx a lot.i went through the documentation for
quadratic bezier curve.
from what i understood,this code,

var myQuadCurve:QuadCurve = new QuadCurve(startX,startY,midX,midY,endX,endY);
myQuadCurve.addEventListener(MouseEvent.MOUSE_OVER ,ShowTooltip);
myQuadCurve.draw();


will draw a curve from (startX,startY) to (endx,endY) through (midX,midY)
and set a mouseOver event listener for it.rite?
what are the packages/classes i need to import for this?

regards,
Arun vallappan