Tutorial Actionscript 3 – How to use a webcam on Flash
Use the webcam in flash is very easy. You need a Video instance and Camera instance.
1 2 3 4 5 6 7 8 9 10 | //Create a video instance video = new Video(640, 480); //Get the camera reference. camara = Camera.getCamera(); //setMode need 3 params, width, height and frame rate. //Optianally you can set a boolean value at the end for the favorArea. camara.setMode(640, 480, 30); //put the camera in the video instance video.attachCamera(camara); addChild(video); |


genial bien
Don’t forget to correctly define the camera and video variable types:
var video:Video = new Video(640, 480);
var camara:Camera = Camera.getCamera();
Very nice article…
Hi Can you help me ? i use this to turn on webcam but how i can show my webcam image to other people ?
I hope u can help me.
John: Sure, if you download the example you will see, the type of the vars are defined. In the post is only an example of how to use it. Have not the definition var too.
Carlos: To do that, you have to stream your webcam. This must be done using a server like Flash Media Server or RED5. Look for streaming in google you will found a lot of info.