Packagecom.whirled.contrib.platformer.display
Classpublic class ParallaxBackground
InheritanceParallaxBackground Inheritance Layer Inheritance flash.display.Sprite

A layer that displays one or more parallax background layers.



Public Properties
 PropertyDefined by
 InheriteddisplayCount : int
Layer
Protected Properties
 PropertyDefined by
  _layers : Array
Our parallax layers.
ParallaxBackground
 Inherited_snapToPixel : Boolean = true
Set to true and all coordinates will be floored.
Layer
Public Methods
 MethodDefined by
  
addChildToLayer(disp:DisplayObject, index:int):void
ParallaxBackground
  
addNewLayer(index:int, scaleX:int = 1, scaleY:int = 1, offX:int = 0, offY:int = 0):void
ParallaxBackground
 Inherited
shutdown():void
Layer
  
update(nX:Number, nY:Number, scale:Number = 1):void
ParallaxBackground
Public Constants
 ConstantDefined by
  USE_BITMAP : Boolean = true
[static]
ParallaxBackground
Property detail
_layersproperty
protected var _layers:Array

Our parallax layers.

Method detail
addChildToLayer()method
public function addChildToLayer(disp:DisplayObject, index:int):voidParameters
disp:DisplayObject
 
index:int
addNewLayer()method 
public function addNewLayer(index:int, scaleX:int = 1, scaleY:int = 1, offX:int = 0, offY:int = 0):voidParameters
index:int
 
scaleX:int (default = 1)
 
scaleY:int (default = 1)
 
offX:int (default = 0)
 
offY:int (default = 0)
update()method 
public override function update(nX:Number, nY:Number, scale:Number = 1):voidParameters
nX:Number
 
nY:Number
 
scale:Number (default = 1)
Constant detail
USE_BITMAPconstant
public static const USE_BITMAP:Boolean = true