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 2009-3-24

Get Adobe Flash player
by hideyuki_ 24 Mar 2009
    Embed
package {
	import flash.display.*;
	import flash.events.Event;
	import flash.filters.ConvolutionFilter;
	import flash.geom.Point;

	public class lifegame extends Sprite
	{
		public function lifegame()
		{
			addChild(new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, false, 0)))["bitmapData"].noise(int(Math.random()*int.MAX_VALUE),0,255,7,true);
			addEventListener(Event.ENTER_FRAME, function (e:Event):void {
				getChildAt(0)["bitmapData"].applyFilter(getChildAt(0)["bitmapData"], getChildAt(0)["bitmapData"].rect, new Point(), new ConvolutionFilter(3, 3, [3,3,3,3,2,3,3,3,3],255,0,true,false,0,1));
				getChildAt(0)["bitmapData"].threshold(getChildAt(0)["bitmapData"], getChildAt(0)["bitmapData"].rect, new Point(), "==",8, 0xFFFFFFFF, 0xFC);
				getChildAt(0)["bitmapData"].threshold(getChildAt(0)["bitmapData"], getChildAt(0)["bitmapData"].rect, new Point(), "!=",0xFFFFFFFF, 0);
			})
		}
	}
}