Reputation: 362
I want to take a Screenshot fo the whole stage in flash. Locally it's working perfectly, but in the html preview it doesnt do anything.
var bitmapData:BitmapData = new BitmapData(product.width,product.height);
bitmapData.draw(this.stage);
var jpgEncoder:JPGEncoder = new JPGEncoder(100);
var byteArray:ByteArray = jpgEncoder.encode(bitmapData);
var fileReference:FileReference=new FileReference();
fileReference.save(byteArray, ".jpg");
Upvotes: 0
Views: 395
Reputation: 5267
As well as BitmapData.draw has a security resctriction. Be sure that all run-time loaded images have permissions in their crossdomain.xml for your domain.
Upvotes: 1