Flash: Screenshot/save viewport image
Is there actionscript to enable a s开发者_JS百科creenshot of a specific area of the screen? And possibly display this screenshot at a different stage?
You will need to use the BitmapData object to draw the current pizels onto a new object. The code might look something like this...
//Assuming x,y,w,h is the area you want to capture
//Create a new bitmap data object to store our screen capture
var bmp:BitmapData = new BitmapData(h, w);
//Draw the stage onto our bitmap data clipping at the correct points
bmp.Draw(stage, null, null, null, new Rectangle(x, y, w, h));
精彩评论