Packagecom.threerings.display
Classpublic class CameraSnapshotter
InheritanceCameraSnapshotter Inheritance flash.display.Sprite



Public Properties
 PropertyDefined by
  height : Number
[read-only]
CameraSnapshotter
  width : Number
[read-only]
CameraSnapshotter
Protected Properties
 PropertyDefined by
  _bitmap : Bitmap
CameraSnapshotter
  _camera : Camera
CameraSnapshotter
  _correctionHeight : int
CameraSnapshotter
  _correctionWidth : int
CameraSnapshotter
  _video : Video
CameraSnapshotter
Public Methods
 MethodDefined by
  
CameraSnapshotter(cameraName:String = null)
CameraSnapshotter
  
CameraSnapshotter
  
getCameraName():String
CameraSnapshotter
  
getSnapshot():BitmapData
CameraSnapshotter
  
hasCamera():Boolean
[static] Static method to determine if the user even has a camera.
CameraSnapshotter
  
setCamera(camera:Camera):void
CameraSnapshotter
  
setCameraName(cameraName:String = null):void
CameraSnapshotter
  
setMode(width:int, height:int, fps:Number, favorArea:Boolean = true):void
Just like Camera's setMode().
CameraSnapshotter
  
takeSnapshot():void
CameraSnapshotter
Protected Methods
 MethodDefined by
  
attachVideo():void
CameraSnapshotter
  
detachVideo():void
CameraSnapshotter
  
handleCameraStatus(event:StatusEvent):void
CameraSnapshotter
  
There appears to be a bug with the camera that "locks" it to the size it was at when it was unmuted.
CameraSnapshotter
Property detail
_bitmapproperty
protected var _bitmap:Bitmap
_cameraproperty 
protected var _camera:Camera
_correctionHeightproperty 
protected var _correctionHeight:int
_correctionWidthproperty 
protected var _correctionWidth:int
heightproperty 
height:Number  [read-only]Implementation
    public function get height():Number
_videoproperty 
protected var _video:Video
widthproperty 
width:Number  [read-only]Implementation
    public function get width():Number
Constructor detail
CameraSnapshotter()constructor
public function CameraSnapshotter(cameraName:String = null)

Parameters
cameraName:String (default = null)

See also

setCamera
Method detail
attachVideo()method
protected function attachVideo():void
clearSnapshot()method 
public function clearSnapshot():void
detachVideo()method 
protected function detachVideo():void
getCameraName()method 
public function getCameraName():String

Returns
String
getSnapshot()method 
public function getSnapshot():BitmapData

Returns
BitmapData
handleCameraStatus()method 
protected function handleCameraStatus(event:StatusEvent):voidParameters
event:StatusEvent
hasCamera()method 
public static function hasCamera():Boolean

Static method to determine if the user even has a camera.

Returns
Boolean
setCamera()method 
public function setCamera(camera:Camera):voidParameters
camera:Camera
setCameraName()method 
public function setCameraName(cameraName:String = null):void

Parameters
cameraName:String (default = null) — the actual name of the camera, not the index (as used to get it from the Camera class).
setCorrection()method 
protected function setCorrection():void

There appears to be a bug with the camera that "locks" it to the size it was at when it was unmuted.

setMode()method 
public function setMode(width:int, height:int, fps:Number, favorArea:Boolean = true):void

Just like Camera's setMode().

Parameters
width:int
 
height:int
 
fps:Number
 
favorArea:Boolean (default = true)

See also

flash.media.Camera.setMode()
takeSnapshot()method 
public function takeSnapshot():void