circle(normal)

by chimanaco
♥0 | Line 26 | Modified 2009-05-18 02:35:47 | MIT License
play

ActionScript3 source code

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

package 
{
	import flash.display.*;
	public class Circle extends Sprite 
	{
		private var _num:int = 120;
		private var _centerX:Number = stage.stageWidth/2;
		private var _centerY:Number = stage.stageHeight / 2;
		private var _width:uint = 50;
		private var _height:uint = 200;
		private var _color:uint = 0x999999;	
		
                public function Circle() {
			var degree:Number = 360 / _num;			
			var circle:Shape;
			for (var i:int = 0; i < _num; i++ ) {
				circle = new Shape();
				circle.graphics.lineStyle(1, _color, 1, false, "normal");
				circle.graphics.drawEllipse(0,  0, _width, _height);
				circle.x = _centerX;
				circle.y = _centerY;
				circle.rotation = i * degree;
				addChild(circle);
			}
		}
	}	
}

Forked