Package | com.bit101.components |
Class | public class PushButton |
Inheritance | PushButton Component flash.display.Sprite |
Property | Defined By | ||
---|---|---|---|
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | ||
height : Number [override]
Sets/gets the height of the component.
|
Component | ||
label : String
Sets / gets the label text shown on this Pushbutton.
|
PushButton | ||
selected : Boolean | PushButton | ||
tag : int
Sets/gets in integer that can identify the component.
|
Component | ||
toggle : Boolean | PushButton | ||
width : Number [override]
Sets/gets the width of the component.
|
Component | ||
x : Number [override] [write-only]
Overrides the setter for x to always place the component on a whole pixel.
|
Component | ||
y : Number [override] [write-only]
Overrides the setter for y to always place the component on a whole pixel.
|
Component |
Property | Defined By | ||
---|---|---|---|
_back : Sprite | PushButton | ||
_down : Boolean = false | PushButton | ||
_enabled : Boolean = true | Component | ||
_face : Sprite | PushButton | ||
_height : Number = 0 | Component | ||
_label : Label | PushButton | ||
_labelText : String | PushButton | ||
_over : Boolean = false | PushButton | ||
Ronda : Class | Component | ||
_selected : Boolean = false | PushButton | ||
_tag : int = -1 | Component | ||
_toggle : Boolean = false | PushButton | ||
_width : Number = 0 | Component |
Method | Defined By | ||
---|---|---|---|
PushButton(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, defaultHandler:Function = null)
Constructor
|
PushButton | ||
draw():void
[override]
Draws the visual ui of the component.
|
PushButton | ||
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
|
Component | ||
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
|
Component | ||
setSize(w:Number, h:Number):void
Sets the size of the component.
|
Component |
Method | Defined By | ||
---|---|---|---|
addChildren():void
[override]
Creates and adds the child display objects of this component.
|
PushButton | ||
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | ||
init():void
[override]
Initializes the component.
|
PushButton | ||
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | ||
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | ||
onMouseDown(event:MouseEvent):void
Internal mouseOut handler.
|
PushButton | ||
onMouseOut(event:MouseEvent):void
Internal mouseOut handler.
|
PushButton | ||
onMouseOver(event:MouseEvent):void
Internal mouseOver handler.
|
PushButton | ||
onMouseUp(event:MouseEvent):void
Internal mouseUp handler.
|
PushButton |
_back | property |
protected var _back:Sprite
_down | property |
protected var _down:Boolean = false
_face | property |
protected var _face:Sprite
_label | property |
protected var _label:Label
_labelText | property |
protected var _labelText:String
_over | property |
protected var _over:Boolean = false
_selected | property |
protected var _selected:Boolean = false
_toggle | property |
protected var _toggle:Boolean = false
label | property |
label:String
Sets / gets the label text shown on this Pushbutton.
public function get label():String
public function set label(value:String):void
selected | property |
selected:Boolean
public function get selected():Boolean
public function set selected(value:Boolean):void
toggle | property |
toggle:Boolean
public function get toggle():Boolean
public function set toggle(value:Boolean):void
PushButton | () | Constructor |
public function PushButton(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, defaultHandler:Function = null)
Constructor
Parameters
parent:DisplayObjectContainer (default = null ) — The parent DisplayObjectContainer on which to add this PushButton.
|
|
xpos:Number (default = 0 ) — The x position to place this component.
|
|
ypos:Number (default = 0 ) — The y position to place this component.
|
|
label:String — The string to use for the initial label of this component.
|
|
defaultHandler:Function (default = null ) — The event handling function to handle the default event for this component (click in this case).
|
addChildren | () | method |
override protected function addChildren():void
Creates and adds the child display objects of this component.
draw | () | method |
override public function draw():void
Draws the visual ui of the component.
init | () | method |
override protected function init():void
Initializes the component.
onMouseDown | () | method |
protected function onMouseDown(event:MouseEvent):void
Internal mouseOut handler.
Parameters
event:MouseEvent — The MouseEvent passed by the system.
|
onMouseOut | () | method |
protected function onMouseOut(event:MouseEvent):void
Internal mouseOut handler.
Parameters
event:MouseEvent — The MouseEvent passed by the system.
|
onMouseOver | () | method |
protected function onMouseOver(event:MouseEvent):void
Internal mouseOver handler.
Parameters
event:MouseEvent — The MouseEvent passed by the system.
|
onMouseUp | () | method |
protected function onMouseUp(event:MouseEvent):void
Internal mouseUp handler.
Parameters
event:MouseEvent — The MouseEvent passed by the system.
|