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: 【wonderfl本】random

Get Adobe Flash player
by asa 31 Jul 2010
    Embed
/**
 * Copyright asa ( http://wonderfl.net/user/asa )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/rhnU
 */

// forked from Knuckle's 【wonderfl本】random
package {
    import flash.display.MovieClip;   
    public class Index extends MovieClip {
        public function Index() {
            var repeatCount:int = 100;
            
            for(var k:uint = 0; k < repeatCount; k++ ){
                var centerX:Number = Math.round(Math.random()*400) + 50;
                var centerY:Number = Math.round(Math.random()*400) + 50;
                var r:Number = Math.ceil(Math.random()*100);
                var futosa = k%10;
                var maru:DrawCircle = new DrawCircle(centerX, centerY, r, futosa)
                
                addChild(maru);
            }
        }
    }
}
import flash.display.MovieClip;
class DrawCircle extends MovieClip {
        public function DrawCircle(centerX:Number, centerY:Number, r:Number, futosa:uint) {
                
            graphics.lineStyle(futosa, 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);
            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);
            
        }
}