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

【wonderfl本】sin,cos

Get Adobe Flash player
by Knuckle 16 Dec 2009
/**
 * Copyright Knuckle ( http://wonderfl.net/user/Knuckle )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/n1Fs
 */

package {
    import flash.display.Sprite;
    public class DrawCircle2 extends Sprite {
        public function DrawCircle2() {
            graphics.beginFill(0x00FFFF);
            graphics.lineStyle(2, 0x0000FF);
            graphics.moveTo(200+100, 300);
                
            for( var d:uint = 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();
        }
    }
}