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.noise

Get Adobe Flash player
by northprint 23 Dec 2008
    Embed
// write as3 code here..
package{
    import flash.display.*;
    import flash.events.*;

    public class NoiseTest extends MovieClip{

        private var _bitmapdata:BitmapData;
        private var _bitmap:Bitmap;

        public function NoiseTest(){
            _bitmapdata = new BitmapData(stage.stageWidth,stage.stageHeight,true);
            _bitmap = new Bitmap(_bitmapdata);
            addChild(_bitmap);
            addEventListener(Event.ENTER_FRAME,enterFrameHandler);
        }
        
        private function enterFrameHandler(e:Event):void{
            var low:Number=Math.random()*64;
            var high:Number=Math.random()*128+128;
            _bitmapdata.noise(1,low,high,1|2|4,false);
        }
    }
}