package {
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.utils.Timer;
import flash.events.TimerEvent;
public class Main extends Sprite {
private var _bitmapData:BitmapData = new BitmapData(400, 400);
public function Main () {
var bitmap:Bitmap = new Bitmap(_bitmapData);
addChild(bitmap);
var timer:Timer = new Timer(50);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
}
private function timerHandler(event:TimerEvent):void {
_bitmapData.noise(Math.random() * 1000000);
}
}
}