Forked from: Knuckle's 【wonderfl本】class diff:4 forked from: 【wonderfl本】class mame forked:0favorite:0lines:32license : MIT License modified : 2010-02-27 16:48:02 Embed Tweet // forked from Knuckle's 【wonderfl本】class package { import flash.display.MovieClip; public class Index extends MovieClip { public function Index() { var myCircle1:DrowCircle = new DrowCircle(); var myCircle2:DrowCircle = new DrowCircle(); myCircle1.x = 50; myCircle2.y = 200; addChild(myCircle1); addChild(myCircle2); } } } import flash.display.MovieClip; class DrowCircle extends MovieClip { public function DrowCircle() { var centerX:Number = 100; var centerY:Number = 200; var r:Number = 50; graphics.lineStyle(2, 0x000000); 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); } } Code Fullscreen Preview Fullscreen Math.tan Math.PI addChild Math.sin MovieClip Number