In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: forked from: webcam

Get Adobe Flash player
by Ashod.Apakian 04 Oct 2010
// forked from venthels's forked from: webcam
// forked from llcheesell's webcam
package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.*;
import flash.media.Camera;
import flash.media.Video;

    public class CameraView extends Sprite {
        private var video:Video;
        private var cameraBmp:Bitmap;
        private var cameraBmpData:BitmapData;
            
        public function CameraView() {
            var camera:Camera = Camera.getCamera();
            
            if (camera != null) {
                video = new Video(320,240);
                video.attachCamera(camera);
                addChild(video);
            } 
            else {
                trace("error");
            }
        }
        
    }
    
}