qnx.events.MagnetometerEvent

MagnetometerEvent

Properties | Methods | Constants


Packageqnx.events
Classpublic class MagnetometerEvent
InheritanceMagnetometerEvent Inheritance flash.events.Event

The Magnetometer class dispatches MagnetometerEvent when updates are received from the magnetometer sensor on the device.

Class information:
BlackBerry 10 Version: 2.1
Found in:  QNXSensors.ane

See also

qnx.sensors.Magnetometer



Public Properties

 PropertyDefined By
  accuracy : int
The current accuracy of the sensor at the time of the event.
MagnetometerEvent
  timestamp : Number
The timestamp of the event.
MagnetometerEvent
  x : Number
The strength of the magnetic field along the x-axis.
MagnetometerEvent
  y : Number
The strength of the magnetic field along the y-axis.
MagnetometerEvent
  z : Number
The strength of the magnetic field along the z-axis.
MagnetometerEvent

Public Methods

 MethodDefined By
  
MagnetometerEvent(type:String, x:Number, y:Number, z:Number, accuracy:int, timestamp:Number)
Creates an MagnetometerEvent object that contains information about the magnetometer along a three dimensional axis.
MagnetometerEvent

Public Constants

 ConstantDefined By
  UPDATE : String = magnetometerUpdate
[static] Defines the value of the type property of a MagnetometerEvent event object.
MagnetometerEvent

Property Detail

accuracy


public var accuracy:int

The current accuracy of the sensor at the time of the event. See the SensorAccuracy class for a list of valid values.

See also

SensorAccuracy

timestamp


public var timestamp:Number

The timestamp of the event.

x


public var x:Number

The strength of the magnetic field along the x-axis.

y


public var y:Number

The strength of the magnetic field along the y-axis.

z


public var z:Number

The strength of the magnetic field along the z-axis.

Constructor Detail

MagnetometerEvent()


public function MagnetometerEvent(type:String, x:Number, y:Number, z:Number, accuracy:int, timestamp:Number)

Creates an MagnetometerEvent object that contains information about the magnetometer along a three dimensional axis.

Parameters

type:String — The type of the event. There is only one type of update event: MagnetometerEvent.UPDATE
x:Number — The strength of the magnetic field along the x-axis.
y:Number — The strength of the magnetic field along the y-axis.
z:Number — The strength of the magnetic field along the z-axis.
accuracy:int — The current accuracy of the sensor at the time of the event. See the SensorAccuracy class for a list of valid values.
timestamp:Number — The timestamp of the event.

Constant Detail

UPDATE


public static const UPDATE:String = magnetometerUpdate

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





comments powered by Disqus