Formula for a curve using "graphics.curveTo"

Hi guys,
I’m using…

“mc.graphics.moveTo”
and…
mc.graphics.curveTo

…to draw out some dynamic lines.

What I want it do is always create the curve in the middle of the line and at an equal distance away from the line.

But the x,y position of the start and finish of these lines could be anything

What I need is some sort of equation that sets the “controlX” and “controlY”
depending on how long the line is and in what position it is.

…Anyone got any ideas for that?

Thanks
Aidan

The below is a pile of pap and doesnt actually work… but thats me trying to figure out some set equation for it…


lineForItem.graphics.moveTo(childDisplay.x, childDisplay.y);
			
var newB:int = familyData.mumsY - childDisplay.y / 2			
var newA:int = familyData.mumsA - childDisplay.A / 2
lineForItem.graphics.curveTo(familyData.mumsX + newA, familyData.mumsY + newB, familyData.mumsX, familyData.mumsY);