Packagefunnel.ui
Classpublic class Accelerometer
InheritanceAccelerometer Inheritance PhysicalInput

This is the class to express an analog accelerometer



Public Properties
 PropertyDefined by
  rotationX : Number
[read-only]
Accelerometer
  rotationY : Number
[read-only]
Accelerometer
  rotationZ : Number
[read-only]
Accelerometer
  x : Number
[read-only]
Accelerometer
  y : Number
[read-only]
Accelerometer
  z : Number
[read-only]
Accelerometer
Public Methods
 MethodDefined by
  
Accelerometer(xPin:Pin, yPin:Pin, zPin:Pin, smoothing:Boolean = true)
Accelerometer
 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
  
setRangeFor(axis:uint, minimum:Number, maximum:Number):void
Accelerometer
 Inherited
willTrigger(type:String):Boolean
PhysicalInput
Public Constants
 ConstantDefined by
  X_AXIS : uint = 0
[static]
Accelerometer
  Y_AXIS : uint = 1
[static]
Accelerometer
  Z_AXIS : uint = 2
[static]
Accelerometer
Property detail
rotationXproperty
rotationX:Number  [read-only]

Implementation
    public function get rotationX():Number
rotationYproperty 
rotationY:Number  [read-only]

Implementation
    public function get rotationY():Number
rotationZproperty 
rotationZ:Number  [read-only]

Implementation
    public function get rotationZ():Number
xproperty 
x:Number  [read-only]

Implementation
    public function get x():Number
yproperty 
y:Number  [read-only]

Implementation
    public function get y():Number
zproperty 
z:Number  [read-only]

Implementation
    public function get z():Number
Constructor detail
Accelerometer()constructor
public function Accelerometer(xPin:Pin, yPin:Pin, zPin:Pin, smoothing:Boolean = true)

Parameters
xPin:Pin — the pin number of the x-axis pin
 
yPin:Pin — the pin number of the y-axis pin
 
zPin:Pin — the pin number of the z-axis pin
 
smoothing:Boolean (default = true) — enable smoothing (defailt is true)

Throws
— least one axis should be NOT null"))
Method detail
setRangeFor()method
public function setRangeFor(axis:uint, minimum:Number, maximum:Number):void

Parameters
axis:uint — the axis to set new range (X_AXIS, Y_AXIS or Z_AXIS)
 
minimum:Number — the new minimum value
 
maximum:Number — the new maximum value
Constant detail
X_AXISconstant
public static const X_AXIS:uint = 0
Y_AXISconstant 
public static const Y_AXIS:uint = 1
Z_AXISconstant 
public static const Z_AXIS:uint = 2