Hello,
For some reason I can not seem to get my polygon created by lineto to fill.
The polygon gets drawn, but the fill never happens. Does anyone have any
suggestions?
The code I am using is bellow:
recColor = 0xFF0000;
transp=0.5;
var graphics:Graphics = recShape.graphics;
graphics.clear();
graphics.lineStyle(3,recColor,100);
graphics.beginFill(recColor,transp);
var lastPoint:Point = null;
for(var i:int=1; i< points.length; i++){
var p1:Point = new Point()
p1.x = points[i-1].x;
p1.y = points[i-1].y;
var p2:Point = new Point();
p2.x = points[i].x;
p2.y = points[i].y;
if (lastPoint == null){
graphics.moveTo(p1.x,p1.y);
graphics.beginFill(recColor,transp);
}
graphics.lineTo(p2.x, p2.y);
lastPoint = p2;
}
graphics.endFill();
Thanks!
-- Carolyn