Webcam in Flash


Today, we will be doing a basic webcam tutorial.
First, open Flash 8. Do any background you like, I did a black to white linear gradient. First, we enter this code:
Flash ActionScript
  1. c = Camera.get();
  2. webCam.attachVideo(c)

Seems pretty simple, doesn't it? What it means is, the first image gets and defines the camera as c.
Now, open the library. You should see a button in the top right hand corner. Click on it, and go to New Video. Drag this video on to the screen, make it the size you want, then name the instance webCam.

Now, test it. You should see yourself (if you have a webcam)
SeanTrek's Avatar
Author:
Views:
2,942
Rating:
There are currently no comments for this tutorial, login or register to leave one.