web Camera Snapshot flash Actionscript 3.0 Component

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

  1. imageFormat jpeg,png
  2. saveType URL,LOCAL
  3. showToolBar true,false
Methods
  1. saveImage() Save the image to local or to url according to saveType property
  2. attachCamera(camindex="0") change Camera
  3. takeSnap() Return Bitmap data from camera
  4. encodeJpeg(quality) you can pass the quality 1 to 100 it will return byteArray of jpeg image
  5. 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

2 comments:

KielSoft said...

Thank You so much for this solution, you have really made my day a great one.

But one other thing I would like you to explain is how to pass the picture data to php and save it on the server.

Thank You once again.

andersb said...

Great work! Is there any chance you could post the source code so we can view the implementation?


PHP developer Cochin |PHP developer Kerala | PHP developer India | Flash developer/programmer Cochin | Flash developer/programmer Kerala | Flash developer/programmer India | web programmer kerala |web programmer Cochin |web programmer India |web developer kerala |Web developer Cochin | Kerala PHP | PHP freelancer| flash actionscript freelancer