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

forked from: Math#cos

Get Adobe Flash player
by itkr 17 Jul 2011
    Embed
/**
 * Copyright itkr ( http://wonderfl.net/user/itkr )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/9uey
 */

// forked from itkr's Math#cos
package {
    import flash.events.Event;
    import flash.display.Sprite;

    public class Main extends Sprite{

        public function Main(){
            var r:int = 0;
            for(var i:int=0;i<22;i++){
                r += Math.PI * 2;
                var g:Sprite = new Sprite();
                g.graphics.beginFill(0x000000);
                g.graphics.drawCircle(0, 0, 5);
                g.x = Math.cos(r) * 130 + 230;
                g.y = Math.sin(r) * 130 + 230;
                addChild(g);
            }
        }
    }
}