flash 画圆

///顺时针 
var R:Number = 240; 
var x:Number = 360; 
_root.createEmptyMovieClip("mc",_root.getNextHighestDepth()); 
with (mc) { 
_x = 400; 
_y = 300; 
} 
mc.lineStyle(5,0xff0000,100); 
mc.moveTo(0, R); 
_root.onEnterFrame = function() { 
if(x>=0) { 
//mc.lineTo(R*Math.sin(x/180*Math.PI),R*Math.cos(x/180*Math.PI)); 
mc.lineTo(R*Math.sin(x/180*Math.PI),R*Math.cos(x/180*Math.PI));
} 
x--; 
if(x<0) { 
delete _root.onEnterFrame; 
} 
};

You may also like...

发表评论