Packagede.popforge.imageprocessing.capture
Classpublic final class WebCam
ImplementsICaptureDevice

The WebCam class represents a camera as a capture device.



Public Methods
 MethodDefined by
  
WebCam(width:int, height:int)
Creates a WebCam object with a specified width and height.
WebCam
  
dispose():void
Frees memory that is used to store the WebCam object.
WebCam
  
getCurrentFrame():BitmapData
Returns a reference to the current frame.
WebCam
  
getPreviousFrame():BitmapData
Returns a reference to the previous frame.
WebCam
  
toString():String
Builds and returns a string that lists the width and height of the WebCam object.
WebCam
Constructor detail
WebCam()constructor
public function WebCam(width:int, height:int)

Creates a WebCam object with a specified width and height.

Parameters
width:int — The width of the webcam image in pixels.
 
height:int — The height of the webcam image in pixels.

Throws
— Width and/or height are invalid (less than or equal to zero, greater than 2880)
Method detail
dispose()method
public function dispose():void

Frees memory that is used to store the WebCam object. This function should be used if you do not need the WebCam object any longer.

getCurrentFrame()method 
public function getCurrentFrame():BitmapData

Returns a reference to the current frame. It is forbidden to use BitmapData.dispose() with such a reference.

Returns
BitmapData — A BitmapData object which is reused for every new frame.
getPreviousFrame()method 
public function getPreviousFrame():BitmapData

Returns a reference to the previous frame. It is forbidden to use BitmapData.dispose() with such a reference.

Returns
BitmapData — A BitmapData object which is reused for every new frame.
toString()method 
public function toString():String

Builds and returns a string that lists the width and height of the WebCam object.

Returns
String — A string listing the value of each of the following properties of the WebCam object: width, height