Reputation: 46919
Can any one point me to a small piece of flex/AS code to test webcam and Microphone.
Thanks
Upvotes: 0
Views: 739
Reputation: 10235
The smallest amount of code you can use to create a web cam video feed is this:
var cam:Camera = Camera.getCamera();
cam.setMode(640,480,30);
var video:Video = new Video(640, 480);
video.attachCamera(cam);
addChild(video);
Glancing over the docs will give you some additional properties and arguments that you can use to suit your needs.
Update Here is a link to a working version of this code http://wonderfl.net/c/oGEY
Upvotes: 1
Reputation: 17217
Adobe supplies examples in the documentation. read flash.media.Camera and flash.media.Microphone. the examples you are looking for are under the getCamera() and getMicrophone() public methods of the Camera and Microphone classes respectively.
Upvotes: 2