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

forked from: Flaxor

Flaxor (989bytes effect)
by Mr.doob
Thanks to Texel (http://www.romancortes.com/) and Forrest Briggs (http://laserpirate.com/flashblog/)
Get Adobe Flash player
by mrdoob 05 Jan 2009
// forked from mrdoob's Flaxor
//
// Flaxor (989bytes effect)
// by Mr.doob
//
// Thanks to Texel (http://www.romancortes.com/) and Forrest Briggs (http://laserpirate.com/flashblog/)
//

package
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.events.Event;
	
	[SWF(width="465",height="465",backgroundColor = "#000000", frameRate = "50")]
	public class Main extends Sprite
	{
		public var canvas : BitmapData;
		public var sw : int = 465, sh : int = 465, timer:int = 0;
		
		public function Main()
		{
			stage.scaleMode = "noScale";
			stage.align = "TL";
			stage.addEventListener("resize", init);
			
			init();
			
			addEventListener("enterFrame", loop);
		}	
		
		public function init() : void
		{
			canvas = new BitmapData(sw, sh, false);
			addChild( new Bitmap(canvas) );
		}
		
		public function loop(e:Event):void
		{
			canvas.lock();
			
			for (var xx:int = 0; xx < sw; xx++)
				for (var yy:int = 0; yy < sh; yy++)				
					canvas.setPixel(xx, yy, (xx + timer | yy + timer) * timer);
			
			canvas.unlock();
			timer++;
		}	
	}
}