/ Published in: ActionScript 3

Generate snow, like on a TV set.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var tvStatic:MovieClip = new MovieClip(); addChild(tvStatic); var bmpData:BitmapData = new BitmapData(320,240); var bmp:Bitmap = new Bitmap(bmpData); tvStatic.addChild(bmp); addEventListener(Event.ENTER_FRAME,generateStatic, false, 0, true); private function generateStatic(e:Event){ bmpData.noise(Math.floor(100000*Math.random()), 0, 255,0, true); }
Comments
