View Full Version : Flash Screenshot
Hu4ley
10-23-2007, 08:38 AM
Hey,
Somebody have an answer to this?
Is it possible for flash take a screenshot of a users desktop and display it from within the swf? Or does this break a few privacy laws?
Thanks
Hurley
BLiZZaRD
10-23-2007, 03:32 PM
yes, with some work (http://www.quasimondo.com/archives/000645.php#000645)
It is a slow and painful process, but doable.
BLiZZaRD
10-23-2007, 03:37 PM
Another option would be to use BitmapData class. although this is very very slow it will do what you need to as well.
I can tell you what it should do, but if it doesn't I can't fix it for you, I don't use it...
import flash.Display.BitmapData
bm=new flash.Display.BitmapData(mc._width,mc._height,false);
bm.draw(mc);
pixelData='';
for(x=0;x<mc._width;x++){
for(y=0;y<mc._height;y++){
pixelData+=bm.getPixel(x,y).toString(16)+',';
}
}
It should go pixel by pixel in the mc stated and get the information, then in turn changing it to a bitmap file then you can do what you need to with it. It works but is SUPER slow. The idea being you are selecting a certain MC, if you want the whole stage make a holderMC and do the whole stage inside the blank MC. Code the BitmapData to the holderMC and viola a stage screen shot :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.