flash on 2010-1-4

by foo9
♥0 | Line 21 | Modified 2010-01-04 01:30:30 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    import flash.display.Shape;
    public class FlashTest extends Sprite {
    	
    		public static const WIDTH:Number = 465.0;
    		public static const HEIGHT:Number = 465.0;
    		public static const HALF_WIDTH:Number = 232.5;
    		public static const HALF_HEIGHT:Number = 232.5;
    		public static const RADIUS:Number = 10.0;
    		
        public function FlashTest() {
        		this.graphics.beginFill(0x0000FF);
			this.graphics.drawCircle(HALF_WIDTH, HALF_HEIGHT, RADIUS);
			this.graphics.endFill();
			
			for(var i:uint=0; i<360; i++) {
				this.graphics.lineStyle(1, 0xFF0000, 1.0);
				this.graphics.drawCircle(RADIUS*Math.cos(i)+HALF_WIDTH, RADIUS*Math.sin(i)+HALF_HEIGHT, RADIUS*2);
				this.graphics.endFill();
			}
        }
    }
}