Packagecom.joebillman.fx
Classpublic class ReflectionBitmap
InheritanceReflectionBitmap Inheritance flash.display.Sprite

Reflection: This class dynamically creates a reflection for the display object that it is passed

View the examples



Public Properties
 PropertyDefined By
  filters : Array
[override] [write-only] Sets the filters array reflection
ReflectionBitmap
  maskHeight : Number
[write-only] Sets the height of the mask
ReflectionBitmap
  maskPaddingX : Number
[write-only] Sets the horizontal padding of the mask.
ReflectionBitmap
  maskPaddingY : Number
[write-only] Sets the vertical padding of the mask
ReflectionBitmap
  spread : Array
[write-only] Sets the spread array for the mask gradient
ReflectionBitmap
  transparency : Array
[write-only] Sets the transparency array for the mask gradient
ReflectionBitmap
Public Methods
 MethodDefined By
  
ReflectionBitmap(target:BitmapData, targetW:Number, targetH:Number)
ReflectionBitmap
  
cleanUp():void
Removes the mask and bitmap and marks them for deletion via the garbage collector
ReflectionBitmap
  
Calls the two functions that build the reflection
ReflectionBitmap
Property Detail
filtersproperty
filters:Array  [write-only] [override]

Sets the filters array reflection

The default value is [].


Implementation
    public function set filters(value:Array):void
maskHeightproperty 
maskHeight:Number  [write-only]

Sets the height of the mask

The default value is target.height/2.


Implementation
    public function set maskHeight(value:Number):void
maskPaddingXproperty 
maskPaddingX:Number  [write-only]

Sets the horizontal padding of the mask. Most useful for text

The default value is 0.


Implementation
    public function set maskPaddingX(value:Number):void
maskPaddingYproperty 
maskPaddingY:Number  [write-only]

Sets the vertical padding of the mask

The default value is 0.


Implementation
    public function set maskPaddingY(value:Number):void
spreadproperty 
spread:Array  [write-only]

Sets the spread array for the mask gradient

The default value is [0, 127, 255].


Implementation
    public function set spread(value:Array):void
transparencyproperty 
transparency:Array  [write-only]

Sets the transparency array for the mask gradient

The default value is [.75, .55, 0].


Implementation
    public function set transparency(value:Array):void
Constructor Detail
ReflectionBitmap()Constructor
public function ReflectionBitmap(target:BitmapData, targetW:Number, targetH:Number)

Parameters
target:BitmapData — Display object of which to make a reflection
 
targetW:Number
 
targetH:Number
Method Detail
cleanUp()method
public function cleanUp():void

Removes the mask and bitmap and marks them for deletion via the garbage collector

drawReflection()method 
public function drawReflection():void

Calls the two functions that build the reflection

Examples
The following example creates