Packageflexlib.containers
Classpublic class ButtonScrollingCanvas
InheritanceButtonScrollingCanvas Inheritance mx.containers.Canvas



Public Properties
 PropertyDefined By
  buttonWidth : Number
ButtonScrollingCanvas
  DEFAULT_BUTTON_WIDTH : Number = 50
[static]
ButtonScrollingCanvas
  explicitButtonHeight : Number
[write-only]
ButtonScrollingCanvas
  horizontalScrollPosition : Number
[override]
ButtonScrollingCanvas
  maxHorizontalScrollPosition : Number
[override] [read-only]
ButtonScrollingCanvas
  maxVerticalScrollPosition : Number
[override] [read-only]
ButtonScrollingCanvas
  scrollJump : Number = 10
ButtonScrollingCanvas
  scrollSpeed : Number = 10
ButtonScrollingCanvas
  startScrollingEvent : String
ButtonScrollingCanvas
  stopScrollingEvent : String
ButtonScrollingCanvas
  verticalScrollPosition : Number
[override]
ButtonScrollingCanvas
Public Methods
 MethodDefined By
  
ButtonScrollingCanvas
  
addChild(child:DisplayObject):DisplayObject
[override] If we have already created the innerCanvas element, then we add the child to that.
ButtonScrollingCanvas
  
addChildAt(child:DisplayObject, index:int):DisplayObject
[override]
ButtonScrollingCanvas
  
getChildAt(index:int):DisplayObject
[override]
ButtonScrollingCanvas
  
getChildByName(name:String):DisplayObject
[override]
ButtonScrollingCanvas
  
getChildIndex(child:DisplayObject):int
[override]
ButtonScrollingCanvas
  
getChildren():Array
[override]
ButtonScrollingCanvas
  
initialize():void
[override]
ButtonScrollingCanvas
Protected Methods
 MethodDefined By
  
[override]
ButtonScrollingCanvas
  
We check to see if the buttons should be shown.
ButtonScrollingCanvas
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
ButtonScrollingCanvas
Styles
 Style Description Defined By
  
buttonWidth
Type: Number CSS Inheritance: no
ButtonScrollingCanvas
  
downButtonStyleName
Type: String CSS Inheritance: no
ButtonScrollingCanvas
  
leftButtonStyleName
Type: String CSS Inheritance: no
ButtonScrollingCanvas
  
rightButtonStyleName
Type: String CSS Inheritance: no
ButtonScrollingCanvas
  
upButtonStyleName
Type: String CSS Inheritance: no
ButtonScrollingCanvas
Property Detail
buttonWidthproperty
buttonWidth:Number


Implementation
    public function get buttonWidth():Number
    public function set buttonWidth(value:Number):void
DEFAULT_BUTTON_WIDTHproperty 
public static var DEFAULT_BUTTON_WIDTH:Number = 50

explicitButtonHeightproperty 
explicitButtonHeight:Number  [write-only]


Implementation
    public function set explicitButtonHeight(value:Number):void
horizontalScrollPositionproperty 
horizontalScrollPosition:Number[override]


Implementation
    public function get horizontalScrollPosition():Number
    public function set horizontalScrollPosition(value:Number):void
maxHorizontalScrollPositionproperty 
maxHorizontalScrollPosition:Number  [read-only] [override]


Implementation
    public function get maxHorizontalScrollPosition():Number
maxVerticalScrollPositionproperty 
maxVerticalScrollPosition:Number  [read-only] [override]


Implementation
    public function get maxVerticalScrollPosition():Number
scrollJumpproperty 
public var scrollJump:Number = 10

scrollSpeedproperty 
public var scrollSpeed:Number = 10

startScrollingEventproperty 
startScrollingEvent:String


Implementation
    public function get startScrollingEvent():String
    public function set startScrollingEvent(value:String):void
stopScrollingEventproperty 
stopScrollingEvent:String


Implementation
    public function get stopScrollingEvent():String
    public function set stopScrollingEvent(value:String):void
verticalScrollPositionproperty 
verticalScrollPosition:Number[override]


Implementation
    public function get verticalScrollPosition():Number
    public function set verticalScrollPosition(value:Number):void
Constructor Detail
ButtonScrollingCanvas()Constructor
public function ButtonScrollingCanvas()



Method Detail
addChild()method
override public function addChild(child:DisplayObject):DisplayObject

If we have already created the innerCanvas element, then we add the child to that. If not, that means we haven't called createChildren yet. So what we do is add the child to this main Canvas, and once we call createChildren we'll remove all the children and switch them over to innerCanvas.

Parameters

child:DisplayObject

Returns
DisplayObject
addChildAt()method 
override public function addChildAt(child:DisplayObject, index:int):DisplayObject

Parameters

child:DisplayObject
 
index:int

Returns
DisplayObject
createChildren()method 
override protected function createChildren():void

enableOrDisableButtons()method 
protected function enableOrDisableButtons():void

We check to see if the buttons should be shown. If we can't scroll in one direction then we don't show that particular button.

getChildAt()method 
override public function getChildAt(index:int):DisplayObject

Parameters

index:int

Returns
DisplayObject
getChildByName()method 
override public function getChildByName(name:String):DisplayObject

Parameters

name:String

Returns
DisplayObject
getChildIndex()method 
override public function getChildIndex(child:DisplayObject):int

Parameters

child:DisplayObject

Returns
int
getChildren()method 
override public function getChildren():Array

Returns
Array
initialize()method 
override public function initialize():void

updateDisplayList()method 
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

Parameters

unscaledWidth:Number
 
unscaledHeight:Number