var bmd1: BitmapData = new BitmapData(80, 80); var bmd2: BitmapData = new BitmapData(80, 80); var seed: int = int(Math.random() * int.MAX_VALUE); bmd1.noise(seed, 0, 0xFF, BitmapDataChannel.RED, false); bmd2.noise(seed, 0, 0xFF, BitmapDataChannel.RED, true); var bm1: Bitmap = new Bitmap(bmd1); this.addChild(bm1); bm1.x = 10; bm1.y = 10; var bm2: Bitmap = new Bitmap(bmd2); this.addChild(bm2); bm2.x = 100; bm2.y = 10; stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler); function enterFrameHandler(e: Event): void { seed = Math.floor(Math.random() * int.MAX_VALUE); bmd1.noise(seed, 0, 0xFF, BitmapDataChannel.RED, false); bmd2.noise(seed, 0, 0xFF, BitmapDataChannel.RED, true); bm1.bitmapData = bmd1; bm2.bitmapData = bmd2; }