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
ButtonScrollingCanvas
  maxHorizontalScrollPosition : Number
[read-only]
ButtonScrollingCanvas
  maxVerticalScrollPosition : Number
[read-only]
ButtonScrollingCanvas
  scrollJump : Number = 10
ButtonScrollingCanvas
  scrollSpeed : Number = 10
ButtonScrollingCanvas
  startScrollingEvent : String
ButtonScrollingCanvas
  stopScrollingEvent : String
ButtonScrollingCanvas
  verticalScrollPosition : Number
ButtonScrollingCanvas
Public Methods
 MethodDefined by
  
ButtonScrollingCanvas
  
addChild(child:DisplayObject):DisplayObject
If we have already created the innerCanvas element, then we add the child to that.
ButtonScrollingCanvas
  
addChildAt(child:DisplayObject, index:int):DisplayObject
ButtonScrollingCanvas
  
getChildAt(index:int):DisplayObject
ButtonScrollingCanvas
  
getChildByName(name:String):DisplayObject
ButtonScrollingCanvas
  
getChildIndex(child:DisplayObject):int
ButtonScrollingCanvas
  
getChildren():Array
ButtonScrollingCanvas
  
initialize():void
ButtonScrollingCanvas
Protected Methods
 MethodDefined by
  
ButtonScrollingCanvas
  
We check to see if the buttons should be shown.
ButtonScrollingCanvas
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
ButtonScrollingCanvas
Styles
 StyleDescriptionDefined 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  [read-write]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  [read-write]Implementation
    public function get horizontalScrollPosition():Number
    public function set horizontalScrollPosition(value:Number):void
maxHorizontalScrollPositionproperty 
maxHorizontalScrollPosition:Number  [read-only]Implementation
    public function get maxHorizontalScrollPosition():Number
maxVerticalScrollPositionproperty 
maxVerticalScrollPosition:Number  [read-only]Implementation
    public function get maxVerticalScrollPosition():Number
scrollJumpproperty 
public var scrollJump:Number = 10
scrollSpeedproperty 
public var scrollSpeed:Number = 10
startScrollingEventproperty 
startScrollingEvent:String  [read-write]Implementation
    public function get startScrollingEvent():String
    public function set startScrollingEvent(value:String):void
stopScrollingEventproperty 
stopScrollingEvent:String  [read-write]Implementation
    public function get stopScrollingEvent():String
    public function set stopScrollingEvent(value:String):void
verticalScrollPositionproperty 
verticalScrollPosition:Number  [read-write]Implementation
    public function get verticalScrollPosition():Number
    public function set verticalScrollPosition(value:Number):void
Constructor detail
ButtonScrollingCanvas()constructor
public function ButtonScrollingCanvas()
Method detail
addChild()method
public override 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 
public override function addChildAt(child:DisplayObject, index:int):DisplayObjectParameters
child:DisplayObject
 
index:int

Returns
DisplayObject
createChildren()method 
protected override 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 
public override function getChildAt(index:int):DisplayObjectParameters
index:int

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

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

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

Returns
Array
initialize()method 
public override function initialize():void
updateDisplayList()method 
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidParameters
unscaledWidth:Number
 
unscaledHeight:Number