i made this component to take snapshot for a community website. i think it's useful so i'm sharing it here. In this version save to server function is disabled but you can do it with takeSnap() method or encodeJpeg(),encodePng();
Small outline About Class
properties
- imageFormat jpeg,png
- saveType URL,LOCAL
- showToolBar true,false
- saveImage() Save the image to local or to url according to saveType property
- attachCamera(camindex="0") change Camera
- takeSnap() Return Bitmap data from camera
- encodeJpeg(quality) you can pass the quality 1 to 100 it will return byteArray of jpeg image
- encodePng() return png image byteArray
Actionscript 3.0 sample code
import com.anilmathewm.camera.*
var snap:SnapShot=new SnapShot();
addChild(snap);
snap.imageFormat="png"
snap.saveType="LOCAL"
snap.showToolBar=true;
Demo Link: http://actionscript.co.in/snapshot/camsmap_sample2.html
Downlands
download MXP Component
download SWC component
download Sample FLA