Packagefunnel.ui
Classpublic class Button
InheritanceButton Inheritance PhysicalInput

This is the class to express a generic button



Public Properties
 PropertyDefined by
  debounceInterval : int
Button
Public Methods
 MethodDefined by
  
Button(buttonPin:Pin, buttonMode:uint, longPressDelay:Number = 1000)
Button
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
PhysicalInput
 Inherited
dispatchEvent(evt:Event):Boolean
PhysicalInput
 Inherited
hasEventListener(type:String):Boolean
PhysicalInput
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
PhysicalInput
 Inherited
willTrigger(type:String):Boolean
PhysicalInput
Events
 EventSummaryDefined by
    Button
    Button
    Button
    Button
Public Constants
 ConstantDefined by
  PULL_DOWN : uint = 0
[static]
Button
  PULL_UP : uint = 1
[static]
Button
Property detail
debounceIntervalproperty
debounceInterval:int  [read-write]

Implementation
    public function get debounceInterval():int
    public function set debounceInterval(value:int):void
Constructor detail
Button()constructor
public function Button(buttonPin:Pin, buttonMode:uint, longPressDelay:Number = 1000)

Parameters
buttonPin:Pin — the pin number for a button
 
buttonMode:uint — the button mode (PULL_DOWN or PULL_UP)
 
longPressDelay:Number (default = 1000) — the delay time for long press

Throws
— should be PULL_DOWN or PULL_UP"))
Event detail
longPressevent 
Event object type: ButtonEvent

pressevent  
Event object type: ButtonEvent

releaseevent  
Event object type: ButtonEvent

sustainedPressevent  
Event object type: ButtonEvent

Constant detail
PULL_DOWNconstant
public static const PULL_DOWN:uint = 0
PULL_UPconstant 
public static const PULL_UP:uint = 1