var ahl:Number = 6;
myShape.graphics.beginFill(color); //had defined color earlier
myShape.graphics.moveTo(XTo, YTo);
// Point A is the end of line at (XTo, YTo).
// Points B and C are the two other points.
var Bx:Number = XTo - ahl * Math.sin(Math.PI/3 - angle);
var By:Number = YTo + ahl * Math.cos(Math.PI/3 - angle);
myShape.graphics.lineTo(Bx, By);
var Cx:Number=Bx-ahl*Math.cos(Math.PI/2 - angle);
var Cy:Number=By-ahl*Math.sin(Math.PI/2 - angle);
myShape.graphics.lineTo(Cx, Cy);
myShape.graphics.lineTo(XTo, YTo);