private function takeSnapshot():void
{
var imageSWFLoader:SWFLoader = new SWFLoader();
var applicationImageSnapshot:ImageSnapshot = ImageSnapshot.captureImage(this.applicationVBox
as IBitmapDrawable);
var imageByteArray:ByteArray = applicationImageSnapshot.data as ByteArray;
imageSWFLoader.id = "applicationSnapShot";
imageSWFLoader.load(imageByteArray);
var applicationImageFileReference:FileReference = new FileReference();
applicationImageFileReference.save(imageByteArray, "screenshot.png");
}
{
var imageSWFLoader:SWFLoader = new SWFLoader();
var applicationImageSnapshot:ImageSnapshot = ImageSnapshot.captureImage(this.applicationVBox
as IBitmapDrawable);
var imageByteArray:ByteArray = applicationImageSnapshot.data as ByteArray;
imageSWFLoader.id = "applicationSnapShot";
imageSWFLoader.load(imageByteArray);
var applicationImageFileReference:FileReference = new FileReference();
applicationImageFileReference.save(imageByteArray, "screenshot.png");
}
No comments:
Post a Comment