Avg. Rating 1.0

Problem

I need to record a video stream from a web cam through my browser.

Solution

Please see below for a code snippet to accomplish this.

Detailed explanation

var video:Video;
var camera:Camera = Camera.getCamera();

    camera.addEventListener(ActivityEvent.ACTIVITY, active);
    video = new Video();
    video.attachCamera(camera);
    
function active(event:Event):void
{
    addChild(video);
    camera.removeEventListener(ActivityEvent.ACTIVITY, active);
}

 

Not sure if that is what you meant?  Further details and explanation in the reference manual:

file:///Library/Application%20Support/Adobe/Help/en_US/Flash/10.0_UsingFlash/WSd60f23110762d6b883b18f10cb1fe1af6-7beca.html

 

 

 

 

 

 

 

 


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes