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

flash on 2010-4-14

Get Adobe Flash player
by kihon 13 Apr 2010
    Embed
/**
 * Copyright kihon ( http://wonderfl.net/user/kihon )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/c8Ft
 */

package
{
	import flash.display.Sprite;
	import flash.events.Event;
 
	public class Main extends Sprite
	{
		private var data:Array = new Array();
 
		public function Main()
		{
			for (var degree:int = 0; degree < 360; degree += 360 / 20)
			{
				var circle:Circle = new Circle();
				circle.degree = degree;
				circle.move();
				addChild(circle);
				data.push(circle);
			}
 
			addEventListener(Event.ENTER_FRAME, onEnterFrame);
		}
 
		private function onEnterFrame(event:Event):void
		{
			for (var i:int = 0; i < data.length; i++) data[i].move();
		}
	}
}
 
import flash.display.Sprite;
 
class Circle extends Sprite
{
	public var degree:Number;
 
	public function Circle()
	{
		graphics.beginFill(int.MAX_VALUE * Math.random());
		graphics.drawCircle(0, 0, 10);
		graphics.endFill();
 
		this.y = 232;
	}
 
	public function move():void
	{
		this.x = 232 + Math.cos(degree * Math.PI / 180) * 200;
		this.z = 232 + Math.sin(degree * Math.PI / 180) * 200;
		degree++;
	}
}