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

Math Experiment #3

Get Adobe Flash player
by Zahurdias.Calimero 14 Dec 2012
    Embed
/**
 * Copyright Zahurdias.Calimero ( http://wonderfl.net/user/Zahurdias.Calimero )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/uDHp
 */

// forked from Zahurdias.Calimero's Math Experiment #2
// forked from Zahurdias.Calimero's Math Experiment #1
package {
    import flash.display.*;
    import flash.math.*;

    public class FlashTest extends Sprite {

        public function FlashTest() {
            // write as3 code here..
            var centerX:Number = stage.stageWidth / 2;
            var centerY:Number = stage.stageHeight / 2;
            var radius:Number,x:Number,y:Number,x1:Number,y1:Number,t:Number;

            radius=150;
            
            graphics.lineStyle(1,0x000000);

            x=centerX + Math.cos(0) * radius ;
            y=centerY + Math.sin(0) * radius ;
            
            graphics.moveTo(x,y);
                        
            for( t = 0; t <= 360; t=t+11 ){
            x=centerX + Math.cos(t) * radius ;
            y=centerY + Math.sin(t) * radius ;
            x1=centerX ;
            y1=centerY;
            graphics.curveTo(x1,y1,x,y);
            }
        }
    }
}