flash on 2010-2-10
♥0 |
Line 35 |
Modified 2010-02-10 12:00:41 |
MIT License
archived:2017-03-20 09:20:58
ActionScript3 source code
/**
* Copyright hacker_j0htd766 ( http://wonderfl.net/user/hacker_j0htd766 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/6uUJ
*/
package{
import flash.display.MovieClip;
public class index extends MovieClip{
public function index(){
var myCircle1:DrawCircle=new DrawCircle();
var myCircle2:DrawCircle=new DrawCircle();
myCircle1.x = 50;
myCircle2.y = 200;
addChild(myCircle1);
addChild(myCircle2);
}
}
}
import flash.display.MovieClip;
class DrawCircle extends MovieClip{
public function DrawCircle(){
var centerX:Number = 120;
var centerY:Number = 200;
var r:Number = 50;
graphics.lineStyle(2,0xff0006);
graphics.moveTo(centerX+r, centerY);
graphics.curveTo(r+centerX, Math.tan(Math.PI/8)*r+centerY,Math.sin(Math.PI/4)*r+centerX,
Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(Math.tan(Math.PI/8)*r+centerX,r+centerY,centerX,r+centerY);
graphics.curveTo(-Math.tan(Math.PI/8)*r+centerX,r+centerY,-Math.sin(Math.PI/4)*r+centerX,
Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(-r+centerX,Math.tan(Math.PI/8)*r+centerY,-r+centerX,centerY);
graphics.curveTo(-r+centerX,-Math.tan(Math.PI/8)*r+centerY,-Math.sin(Math.PI/4)*r+centerX,
-Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(-Math.tan(Math.PI/8)*r+centerX,-r+centerY,centerX, -r+centerY);
graphics.curveTo(Math.tan(Math.PI/8)*r+centerX,-r+centerY,Math.sin(Math.PI/4)*r+centerX,
-Math.sin(Math.PI/4)*r+centerY);
graphics.curveTo(r+centerX,-Math.tan(Math.PI/8)*r+centerY,r+centerX,centerY);
}
}