Packagecom.transmote.flar.source
Classpublic class FLARLoaderSource
InheritanceFLARLoaderSource Inheritance flash.display.Sprite
Implements IFLARSource

Use the contents of a Loader as a source image for tracker target detection. FLARLoaderSource samples the contents of a Loader against a white background, to provide maximum contrast for marker detection. This class can be used for testing marker detection without a camera, for example with a swf or jpeg with valid patterns within.



Public Properties
 PropertyDefined By
  inited : Boolean
[read-only] Returns true if initialization is complete.
FLARLoaderSource
  mirrored : Boolean
FLARLoaderSource cannot be mirrored; method is here only for compliance with IFLARSource.
FLARLoaderSource
  source : BitmapData
[read-only] Retrieve the BitmapData source used for analysis.
FLARLoaderSource
  sourceDirty : Boolean
[read-only] FLARLoaderSource always returns true, to ensure tracking happens every frame.
FLARLoaderSource
  sourceSize : Rectangle
[read-only] Size of BitmapData source used for analysis.
FLARLoaderSource
  trackerToDisplayRatio : Number
[read-only] Ratio of area of tracker's reported results to display size.
FLARLoaderSource
Public Methods
 MethodDefined By
  
FLARLoaderSource(contentPath:String, displayWidth:Number, displayHeight:Number, trackerToSourceRatio:Number = 0.5)
Constructor.
FLARLoaderSource
  
dispose():void
Halts all processes and frees this instance for garbage collection.
FLARLoaderSource
  
update():void
Update the BitmapData source used for analysis.
FLARLoaderSource
Property Detail
initedproperty
inited:Boolean  [read-only]

Returns true if initialization is complete. FLARLoaderSource is inited automatically in constructor.


Implementation
    public function get inited():Boolean
mirroredproperty 
mirrored:Boolean

FLARLoaderSource cannot be mirrored; method is here only for compliance with IFLARSource.


Implementation
    public function get mirrored():Boolean
    public function set mirrored(value:Boolean):void
sourceproperty 
source:BitmapData  [read-only]

Retrieve the BitmapData source used for analysis. NOTE: returns the actual BitmapData object, not a clone.


Implementation
    public function get source():BitmapData
sourceDirtyproperty 
sourceDirty:Boolean  [read-only]

FLARLoaderSource always returns true, to ensure tracking happens every frame.


Implementation
    public function get sourceDirty():Boolean
sourceSizeproperty 
sourceSize:Rectangle  [read-only]

Size of BitmapData source used for analysis.


Implementation
    public function get sourceSize():Rectangle
trackerToDisplayRatioproperty 
trackerToDisplayRatio:Number  [read-only]

Ratio of area of tracker's reported results to display size. Use to scale (multiply) results of tracker analysis to correctly fit display area.


Implementation
    public function get trackerToDisplayRatio():Number
Constructor Detail
FLARLoaderSource()Constructor
public function FLARLoaderSource(contentPath:String, displayWidth:Number, displayHeight:Number, trackerToSourceRatio:Number = 0.5)

Constructor.

Parameters
contentPath:String — Filename to load.
 
displayWidth:Number — Width at which to display video.
 
displayHeight:Number — Height at which to display video.
 
trackerToSourceRatio:Number (default = 0.5) — Amount to downsample camera input. The captured video is scaled down by this value before being sent to tracker for analysis. Trackers run faster with more downsampling, but also have more difficulty recognizing marker patterns and targets. A value of 1.0 results in no downsampling; A value of 0.5 (the default) downsamples the camera input by half.
Method Detail
dispose()method
public function dispose():void

Halts all processes and frees this instance for garbage collection.

update()method 
public function update():void

Update the BitmapData source used for analysis.