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

Butterfly

Get Adobe Flash player
by makc3d 18 Jan 2011
package {
	import flash.display.Sprite;
	import flash.events.Event;
	public class Butterfly extends Sprite{
		public function Butterfly () {
			graphics.lineStyle (0);
			graphics.moveTo (465 / 2, 465 / 2);
			addEventListener (Event.ENTER_FRAME, loop);
		}
		private var t:Number = -0.2;
		private function loop(e:Event):void {
			var r:Number = Math.exp (Math.sin (t)) - 2 * Math.cos (4 * t) + Math.pow (Math.sin ((t - Math.PI / 2) / 12), 5);
			graphics.lineTo (465 / 2 + 50 * r * Math.cos (t), 465 / 2 - 30 * r * Math.sin (t));
			t += 0.03;
		}
	}
}