In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2011-11-23

Get Adobe Flash player
by tannorio 23 Nov 2011
    Embed
/**
 * Copyright tannorio ( http://wonderfl.net/user/tannorio )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/hm0v
 */

package {
    import flash.display.AVM1Movie;
    import flash.display.Sprite;
    public class DrawCircle extends Sprite {
        public function DrawCircle() {
            // write as3 code here..
            var centerX:Number=100;
            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.beginFill(0x00ffff);
            graphics.lineStyle(10,0xffd700,1)
            graphics.moveTo(200+100,300);
            //描画
            for(var d:int=0;d<360;d++){
                var radian:Number=d*Math.PI/180;
                graphics.lineTo(200+100*Math.cos(radian),300+100*Math.sin(radian))
            }
                graphics.endFill();
            
        }
    }
}