make a flash app to take snapshot and submit the picture to a url

Tag: flash Author: cliangqun Date: 2009-08-09

I want to build a flash app to let me and my users snap a webcam picture and upload it to a url (post multipart data).

Where do i start enabling this in flash?

I have flash CS4 btw.

Best Answer

The basic procedure is to populate a Video object via attachCamera with a camera object you got using Camera.get(). Then you capture a bitmap of the video by creating a BitmapData object and using it's draw method. Finally, using the JPGEncoder (part of the as3corelib library - just google it) to encode the BitmapData object to a ByteArray object which you'll send to the server via URLLoader and URLRequest.