开发者

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));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜