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

puff

Get Adobe Flash player
by Scmiz 28 May 2011
    Embed
/**
 * Copyright Scmiz ( http://wonderfl.net/user/Scmiz )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/3Qxb
 */

package {
	import flash.display.Graphics;
    import flash.display.Sprite;
	import flash.events.Event;
    public class FlashTest extends Sprite {
		private var _centerX:Number;
		private var _centerY:Number;
		
        public function FlashTest() {
			_centerX = 232.5;
			_centerY = 232.5;
			this.addEventListener(Event.ENTER_FRAME, proc);
        }
		
		private function proc(e:Event):void {
			var g:Graphics = this.graphics;
			g.clear();
			
			g.beginFill(0x000000);
			g.drawRect(0, 0, 465, 465);
			g.endFill();
			
			var length:Number = 220;
			var split:uint = 20;
			for (var index:uint = 0; index < 100; ++index) {
				var rad:Number = Math.random() * Math.PI * 2;

				for (var splitIndex:uint = 0; splitIndex < split; ++splitIndex) {
					g.lineStyle(1, 0xffffff, 1.0 - (Number(splitIndex) / split));
					var near:Number = length * (Number(splitIndex) / split);
					var far:Number = length * (Number(splitIndex + 1) / split);
					g.moveTo(_centerX + (Math.cos(rad) * near), _centerY + (Math.sin(rad) * near));
					g.lineTo(_centerX + (Math.cos(rad) * far), _centerY + (Math.sin(rad) * far));
				}
			}
		}
    }
}