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

spiral3

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

package {
    import flash.display.Sprite;
	import flash.events.Event;
    public class FlashTest extends Sprite {
		private var _sprite:Sprite;
		
        public function FlashTest() {
			this.graphics.beginFill(0x000000);
			this.graphics.drawRect(0, 0, 465, 465);
			this.graphics.endFill();
			
			_sprite = new Sprite();
			_sprite.x = 232.5;
			_sprite.y = 232.5;
			this.addChild(_sprite);
			
			this.addEventListener(Event.ENTER_FRAME, proc);
        }

		private function proc(e:Event):void {
			for (var index:uint = 0; index < 4; ++index) {
				var dot:Dot = new Dot();
				var rad:Number = Math.random() * 2 * Math.PI;
				var length:Number = 350;
				dot.x = Math.cos(rad) * length;
				dot.y = Math.sin(rad) * length;
				_sprite.addChild(dot);
			}
			_sprite.rotationZ += 5;
		}
    }
}

import flash.display.Sprite;
import caurina.transitions.Tweener;

class Dot extends Sprite {
	public function Dot() {
		var r:uint = 128 + (Math.random() * 128);
		var g:uint = 128 + (Math.random() * 128);
		var b:uint = 128 + (Math.random() * 128);
		var color:uint = (r << 16) + (g << 8) + (b << 0);
		
		this.graphics.beginFill(color);
		this.graphics.drawCircle(0, 0, 5 + (Math.random() * 5));
		this.graphics.endFill();
		
		Tweener.addTween(this,
		{
			x:0,
			y:0,
			time:60,
			scaleX:0,
			scaleY:0,
			useFrames:true,
			onComplete:function():void {
				parent.removeChild(this);
			}
		}
		);
	}
}