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

BITMAPDATA LCD GRID

/**
 * Copyright vectorcinco ( http://wonderfl.net/user/vectorcinco )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/7q4T
 */

package {
	import flash.display.Sprite;
	import flash.display.Loader;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
	import flash.net.URLRequest;
	import flash.display.BitmapData;
	import flash.geom.Rectangle;
	import flash.geom.Point;

	public class Grid extends Sprite {
		public function Grid() {
                        stage.align=StageAlign.TOP_LEFT;
                        stage.scaleMode=StageScaleMode.NO_SCALE;
                        
			var colors:Array=[0xFFFF0000,0xff00FF00,0xff0000FF,0xff000000];
			var bmd:BitmapData=new BitmapData(2,2,true,0x00000000);
			var alfa:uint=0xFF;

			for (var i:uint = 0; i<colors.length; i++) {
				var bmdColor:BitmapData=new BitmapData(1,1,false,0x00000000);
				bmdColor.fillRect(new Rectangle(0,0,1,1),colors[i]);
				bmd.merge(bmdColor,new Rectangle(0,0,1,1), new Point(i%2,Math.floor(i/2)), alfa, alfa, alfa, alfa);
			}
			var s:Sprite = new Sprite();
			s.graphics.beginBitmapFill(bmd);
			s.graphics.drawRect(0,0, stage.stageWidth, stage.stageHeight);
			s.graphics.endFill();
			s.blendMode="overlay";

			var loader:Loader=new Loader();
			loader.load(new URLRequest("http://jackson.lib.mi.us/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=8010&g2_serialNumber=2"));
			addChild(loader);

			addChild(s);
		}

	}

}