How to screen capture a particular position in a stage

basically i would like to screen capture a part for the stage. but i got no idea how to do it as i am very new to flash programming.

i am using the PNGencoder to do the process, but i cant actually screen capture the position i want.

this is tje sniplet of the code for the process. It is taken from a tutorial with some changes, but it is still lacking of the position of the stage i want to screen capture.

thanks in advance :wink:

private function export():void
{
var bmd:BitmapData = new BitmapData(216.2, 468.29);

                 bmd.draw(stage);
                

                 var ba:ByteArray = PNGEncoder.encode(bmd);

                 var file:FileReference = new FileReference();

                 file.addEventListener(Event.COMPLETE, saveSuccessful);

                 file.save(ba, "MyDrawing.png");
             }

the code are working properly for now except it captures the point from 0 x axis and 0 y axis. I need it to be like 150 on x axis and 150 on y axis. Thanks.