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

Generic Static

Generic Static 
@author Marco Di Giuseppe
@see http://designmarco.com
@since 4/11/09
Get Adobe Flash player
by marco 11 Apr 2009
/**
 * Copyright marco ( http://wonderfl.net/user/marco )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/wwrW
 */

package
{
        /**
	 * Generic Static 
	 * @author Marco Di Giuseppe
	 * @see http://designmarco.com
	 * @since 4/11/09
	 */
	import flash.display.Sprite;
	import flash.display.Shape;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Graphics;
	import flash.events.Event;

	[SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]

	public class Main extends Sprite
	{
		private var bitmapData:BitmapData;

		public function Main()
		{
			var _static:Sprite = Sprite(addChild(new Sprite));
			var _mask:Shape = new Shape();
			_mask.graphics.beginFill(0x000000);
			_mask.graphics.drawRect(0, 0, 465, 465);
			
			bitmapData = new BitmapData(_mask.width, _mask.height);

			_static.addChild(new Bitmap(bitmapData));
			_static.mask = _mask;
			_static.addEventListener(Event.ENTER_FRAME, render, false, 0, true);
		}

		private function render(event:Event):void
		{
			bitmapData.noise(int(Math.random() * int.MAX_VALUE), 0, 0xFFFFFF, 1, true);
		}
	}
}