Packagecom.rockonflash.logo.utils
Classpublic class IlluminationMonitor
InheritanceIlluminationMonitor Inheritance flash.events.EventDispatcher

IlluminationManager is responsible for evaluating the predominant color in a given area of a target DisplayObject.

It takes that dominant color and applies it to a dropShadowFilter of the filterTarget object. This gives the simulation of dynamic ambient lighting



Public Properties
 PropertyDefined by
  boxHeight : Number
The height of the area you want to have inspected
IlluminationMonitor
  boxWidth : Number
The width of the area you want to have inspected
IlluminationMonitor
  filterTarget : DisplayObject
filterTarget is the object we're going to set the dynamic shadow color to
IlluminationMonitor
  target : DisplayObject
IlluminationMonitor
  testRect : Sprite
testRect is where you'd draw your sample box so you can see where you're sampling your color data
IlluminationMonitor
  testView : Bitmap
testView is if you want to see the bdColor bitmapdata object
IlluminationMonitor
Public Methods
 MethodDefined by
  
IlluminationMonitor(target:IEventDispatcher = null)
IlluminationMonitor
  
assesColor():void
Draws the target into the bdColor object and loops through the pixels of the defined box area.
IlluminationMonitor
Property detail
boxHeightproperty
public var boxHeight:Number

The height of the area you want to have inspected

boxWidthproperty 
public var boxWidth:Number

The width of the area you want to have inspected

filterTargetproperty 
public var filterTarget:DisplayObject

filterTarget is the object we're going to set the dynamic shadow color to

targetproperty 
target:DisplayObject  [read-write]Implementation
    public function get target():DisplayObject
    public function set target(value:DisplayObject):void
testRectproperty 
public var testRect:Sprite

testRect is where you'd draw your sample box so you can see where you're sampling your color data

testViewproperty 
public var testView:Bitmap

testView is if you want to see the bdColor bitmapdata object

Constructor detail
IlluminationMonitor()constructor
public function IlluminationMonitor(target:IEventDispatcher = null)Parameters
target:IEventDispatcher (default = null)
Method detail
assesColor()method
public function assesColor():void

Draws the target into the bdColor object and loops through the pixels of the defined box area. It then sets the drop shadow filter for the filterTarget