The Accelerometer object dispatches AccelerometerEvent objects when acceleration updates are obtained from the Accelerometer sensor installed on the device.


Inherited from Event.


Can be created using method new:

Lib.Media.Events.AccelerometerEvent.new(type, bubbles, cancelable, timestamp, accelerationX, accelerationY, accelerationZ)

Creates an AccelerometerEvent object that contains information about acceleration along three dimensional axis.

type - The type of the event. Event listeners can access this information through the inherited type property. There is only one type of update event: AccelerometerEvent.UPDATE. 

bubbles - (default = false) - Determines whether the Event object bubbles. Event listeners can access this information through the inherited bubbles property.

cancelable - (default = false) - Determines whether the Event object can be canceled. Event listeners can access this information through the inherited cancelable property.

timestamp - (default = 0) - The timestamp of the Accelerometer update.

accelerationX - (default = 0) - The acceleration value in Gs (9.8m/sec/sec) along the x-axis.

accelerationY - (default = 0) - The acceleration value in Gs (9.8m/sec/sec) along the y-axis. 

accelerationZ - (default = 0) - The acceleration value in Gs (9.8m/sec/sec) along the z-axis.


Created AccelerometerEvent object has properties:

accelerationX

Acceleration along the x-axis, measured in Gs.

accelerationY

Acceleration along the y-axis, measured in Gs.

accelerationZ

Acceleration along the z-axis, measured in Gs.

timestamp

The number of milliseconds at the time of the event since the runtime was initialized.


methods:

clone()

Creates a copy of an AccelerometerEvent object and sets the value of each property to match that of the original.


toString()

Returns a string that contains all the properties of the AccelerometerEvent object.



event types:

Lib.Media.Events.AccelerometerEvent.UPDATE

Defines the value of the type property of a AccelerometerEvent event object.

Created with the Personal Edition of HelpNDoc: Generate EPub eBooks with ease