Seguendo l'articolo
http://flash-mx.html.it/articoli/vie...olo=28&idpag=2
si riesce a creare semplicemente un cerchio con
MovieClip.prototype.drawCircle = function(x,y,radius, startAngle, endAngle, segments) {
Math.rad = Math.PI/180;
lineStyle(1, 0x000000, 100);
var segm = (endAngle-startAngle)/segments;
this.moveTo(x+radius*Math.cos(startAngle*Math.rad) ,
y+radius*Math.sin(startAngle*Math.rad));
for (var s = startAngle+segm; s<=endAngle+1; s += segm) {
var c_x = radius*Math.cos(s*Math.rad);
var c_y = radius*Math.sin(s*Math.rad);
var a_x = c_x+radius*Math.tan(segm/2*Math.rad)*Math.cos((s-90)*Math.rad);
var a_y = c_y+radius*Math.tan(segm/2*Math.rad)*Math.sin((s-90)*Math.rad);
this.curveTo(a_x+x, a_y+y, c_x+x, c_y+y);
}
}
// creazione del cechio
this.drawCircle(200,200,100,0,360,8);
Però non riesco a creare il cerchio dentro ad un clip![]()