Taking a picture from user's webcam a la Facebook
i didn't find a recent question so somethign might have changed:
there is any widget, ready to use, to integrate开发者_运维知识库 with my website in order for my users to take a picture of themselves ala Facebook when they register to my site? i guess is Flash/flex based
thanks
don't know of a widget, but it's not too tough to write something like this... access the camera, save image to a bitmapdata object, use as3corelib to encode it to jpeg (http://github.com/mikechambers/as3corelib)and post it to your server using PHP or other middleware script.
This tutorial gets you pretty close to where you want to be: http:// www.adobe.com/devnet/air/ajax/quickstart/articles/jpeg_file_upload.html
If you don't want to write your own, you could always buy a component: http://www.buystockflash.com/Take-My-Picture-v1.0-/-WebCam/flash-animation-251.html
Take a look at Userbooth. It uses actionscript and php. Opensource and it's free.
http://www.userbooth.com/
Add "accept" attribute to file upload control. It will launch photo application on phone. Tested with Google Chrome browser on Android platform.
<input type="file" id="fileupload" accept="image/*;capture=camera" />
精彩评论