Finally, this solution was used to copy part of the stage.
(I copied everything on the scene (360, 20) and after)
var bitmapdata:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight); bitmapdata.draw(stage); var bitmapDataA: BitmapData = new BitmapData(300, 250); bitmapDataA.copyPixels(bitmapdata, new Rectangle(360, 20, 320, 240), new Point(0, 0)); var myEncoder:JPGEncoder = new JPGEncoder(90); var byteArray:ByteArray = myEncoder.encode(bitmapDataA);
source share