ciao con questo script, che non e' mio, crei un cerchio con il buco (una ciambella") tutto via AS
codice:
//negatyve
//http://forum.html.it/forum/showthread.php?s=&threadid=811725&perpage=15&highlight=mask&pagenumber=2
MovieClip.prototype.drawTorus = function(x, y, outerRadius, innerRadius, startAngle, endAngle, segments)
{
var rad = Math.PI / 180;
var segm = (endAngle - startAngle) / segments;
this.moveTo(x + outerRadius * Math.cos(startAngle * rad), y + outerRadius * Math.sin(startAngle * rad));
this.beginFill(0xff0000, 100);
for (var s = startAngle + segm; s <= endAngle + 1; s += segm) {
var c_x = outerRadius * Math.cos(s * rad);
var c_y = outerRadius * Math.sin(s * rad);
var a_x = c_x + outerRadius * Math.tan(segm / 2 * rad) * Math.cos((s - 90) * rad);
var a_y = c_y + outerRadius * Math.tan(segm / 2 * rad) * Math.sin((s - 90) * rad);
this.curveTo(a_x + x, a_y + y, c_x + x, c_y + y);
}
this.moveTo(x + innerRadius * Math.cos(startAngle * rad), y + innerRadius * Math.sin(startAngle * rad));
for (var s = endAngle; s >= 0; s -= segm) {
var c_x = innerRadius * Math.cos(s * rad);
var c_y = innerRadius * Math.sin(s * rad);
var a_x = c_x + innerRadius * Math.tan(segm / 2 * rad) * Math.cos((s + 90) * rad);
var a_y = c_y + innerRadius * Math.tan(segm / 2 * rad) * Math.sin((s + 90) * rad);
this.curveTo(a_x + x, a_y + y, c_x + x, c_y + y);
}
this.endFill();
};
this.createEmptyMovieClip("mask", 1);
mask.drawTorus(220, 130, 100, 70, 0, 360, 8);
mc.setMask(mask)