Hi All,
First - see the attached file!
Based on 10 values i need to draw a polygon.
In the code below I am able to draw a polygon but i need to dynamicly use the values in the array 'arrValues'
Any help is rewarded with good good karmaPHP Code:ArrValues=[1,10,7,4,9,1,8,2,6,4];
point = 0;
noOfPoints = 10;
steps = (2*Math.PI)/noOfPoints;
_root.createEmptyMovieClip ("polygon", 1);
with (_root.polygon){
beginFill (0x0000FF, 50);
lineStyle (5, 0xFF00FF, 100);
moveTo (100*Math.cos(point), 100*Math.sin(point));
for (i=0; i<noOfPoints; i++) {
point += steps;
pointX = 100*Math.cos(point);
pointY = 100*Math.sin(point);
lineTo (pointX, pointY);
}
endFill();
}
//podenphant




Reply With Quote