package{ import flash.display.*; public class Main extends Sprite{ public function Main(){ var imgData:BitmapData = new BitmapData(500, 500, true, 0x00000000); var bmp:Bitmap = new Bitmap(imgData); imgData.lock( ); var color:uint; for (var i:int = 0; i < imgData.height ; i++) { for (var j:int = 0; j < imgData.width; j++) { color = Math.floor(Math.random( )*0xFFFFFFFF); imgData.setPixel32(j, i, color); } } imgData.unlock( ); } }}
Name (required)
email (will not be published) (required)
Website