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

DotSprite

Get Adobe Flash player
by atsumo 25 Feb 2009
    Embed
package {
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.system.Capabilities;
	
	public class DotSprite extends Sprite {
        public function DotSprite() {
            var dotSprite:Sprite = new Sprite();
			
			var sp:Sprite = dot();
			var bt:BitmapData = new BitmapData(sp.width, sp.height);
			bt.draw(sp);
			dotSprite.graphics.beginBitmapFill(bt);
			dotSprite.graphics.drawRect(0, 0, Capabilities.screenResolutionX, Capabilities.screenResolutionY);
			dotSprite.graphics.endFill();
			addChild(dotSprite);
            
        }
		
		private function dot(distance:int=3,size:int=5,color:uint = 0x000000,alphaNum:Number=0.5):Sprite {
			var sp:Sprite = new Sprite();
			sp.graphics.beginFill(color,alphaNum);
			sp.graphics.drawRect(distance, distance, size, size);
			sp.graphics.endFill();
			
			return sp;
		}
    }
}