View comments | RSS feed

Camera


Object
    |
    +-Camera

public class Camera
extends Object

The Camera class is primarily for use with Macromedia Flash Communication Server, but can be used in a limited way without the server.

The Camera class lets you capture video from a video camera attached to the computer that is running Macromedia Flash Player--for example, to monitor a video feed from a web camera attached to your local system. (Flash provides similar audio capabilities; for more information, see the Microphone class entry.)

Warning: When a SWF file tries to access the camera returned by Camera.get(), Flash Player displays a Privacy dialog box that lets the user choose whether to allow or deny access to the camera. (Make sure your Stage size is at least 215 x 138 pixels for the Camera class examples; this is the minimum size Flash requires to display the dialog box.) End users and administrative users may also disable camera access on a per-site or global basis.

To create or reference a Camera object, use the Camera.get() method.

Availability: ActionScript 1.0; Flash Player 6

Property summary

Modifiers

Property

Description

 

activityLevel:Number [read-only]

A numeric value that specifies the amount of motion the camera is detecting.

 

bandwidth:Number [read-only]

An integer that specifies the maximum amount of bandwidth the current outgoing video feed can use, in bytes.

 

currentFps:Number [read-only]

The rate at which the camera is capturing data, in frames per second.

 

fps:Number [read-only]

The maximum rate at which you want the camera to capture data, in frames per second.

 

height:Number [read-only]

The current capture height, in pixels.

 

index:Number [read-only]

A zero-based integer that specifies the index of the camera, as reflected in the array returned by Camera.names.

 

motionLevel:Number [read-only]

A numeric value that specifies the amount of motion required to invoke Camera.onActivity(true).

 

motionTimeOut:Number [read-only]

The number of milliseconds between the time the camera stops detecting motion and the time Camera.onActivity (false) is invoked.

 

muted:Boolean [read-only]

A Boolean value that specifies whether the user has denied access to the camera (true) or allowed access (false) in the Flash Player Privacy Settings panel.

 

name:String [read-only]

A string that specifies the name of the current camera, as returned by the camera hardware.

static

names:Array [read-only]

Retrieves an array of strings reflecting the names of all available cameras without displaying the Flash Player Privacy Settings panel.

 

quality:Number [read-only]

An integer specifying the required level of picture quality, as determined by the amount of compression being applied to each video frame.

 

width:Number [read-only]

The current capture width, in pixels.

Properties inherited from class Object

constructor, __proto__, prototype, __resolve


Event summary

Event

Description

onActivity = function(active:Boolean) {}

Invoked when the camera starts or stops detecting motion.

onStatus = function(infoObject:Object) {}

Invoked when the user allows or denies access to the camera.

Method summary

Modifiers

Signature

Description

static

get([index:Number]) : Camera

Returns a reference to a Camera object for capturing video.

 

setMode([width:Number], [height:Number], [fps:Number], [favorArea:Boolean]) : Void

Sets the camera capture mode to the native mode that best meets the specified requirements.

 

setMotionLevel([motionLevel:Number], [timeOut:Number]) : Void

Specifies how much motion is required to invoke Camera.onActivity(true).

 

setQuality([bandwidth:Number], [quality:Number]) : Void

Sets the maximum amount of bandwidth per second or the required picture quality of the current outgoing video feed.

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

Comments


bcraigie said on Nov 2, 2006 at 1:04 PM :
What seems to be lacking here is a description of how to get flash to save the captured video (and audio) stream somewhere (without the FCS). Can this be done, say to a flv file ?

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00002026.html