tags:

views:

15

answers:

1

Using Flex, what is the recommended way of taking a webcam snapshot picture?

Something along the lines of:

var camera:Camera = Camera.getCamera();
var image:Image = /* magic goes here */
+1  A: 

First, you have to create a Video object in which you attach the camera :

var video:Video = new Video(320,240);
video.attachCamera(camera);
addChild(video);

Then create an instance of a BitmapData with the same size as your video object and draw in it the video object.

var bitmapData:BitmapData = new BitmapData(video.width,video.height);
bitmapData.draw(video);
PeZ