flash on 2009-6-2

by atsumo
♥0 | Line 22 | Modified 2009-06-02 09:11:43 | MIT License
play

ActionScript3 source code

/**
 * Copyright atsumo ( http://wonderfl.net/user/atsumo )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/2gzz
 */

package {
    import flash.display.Sprite;
    public class CircleTest extends Sprite {
        public function CircleTest() {
            
			for (var i:int = 0; i < 100; i++) {
				var circle:Circle = new Circle(int(Math.random() * 0xFFFFFF),int(Math.random() * 10));
				circle.x = int(Math.random() * stage.stageWidth);
				circle.y = int(Math.random() * stage.stageHeight);
				addChild(circle);
			}
			
            
        }
    }
}

import flash.display.Sprite;
class Circle extends Sprite {
	public function Circle(c:uint = 0xFFFFFF,r:int=3)
	{
		this.graphics.beginFill(c);
		this.graphics.drawCircle(0, 0, r);
		this.graphics.endFill();
	}
}