var bmd1: BitmapData = new BitmapData(90, 60, false, 0x00000000); var bmd2: BitmapData = bmd1.clone(); //拷贝 //"画"一条白色的线 for (var i: uint = 10; i <= 40; i++) { bmd1.setPixel32(i, i, 0xFFFFFFFF); } trace(bmd1.getPixel32(10, 10).toString(16)); // ffffffff trace(bmd2.getPixel32(10, 10).toString(16)); // ff000000 var bm1: Bitmap = new Bitmap(bmd1); this.addChild(bm1); bm1.x = bm1.y = 5; var bm2: Bitmap = new Bitmap(bmd2); bm2.x = 105; bm2.y = 5; this.addChild(bm2);