FANDOM


Sent to the current card of the defaultStack at the interval specified by the mobileEnableAccelerometer command.Syntax:

accelerationChanged <x>, <y>, <z>

Examples:

on accelerationChanged pXAccel, pYAccel, pZAccel
   -- display the acceleration along the x axis
   put pXAccel into tXAxisAcceleration
end accelerationChanged

Handle the accelerationChanged message if you want to perform an action when the acceleration along any axis changes

The accelerationChanged message is sent to the current card of the defaultStack at the interval specified by the mobileEnableAccelerometer command.

You can use the difference between the time values in two accelerationChanged events to give an indication of how much time passed between the samples.

Parameters:

  • x: the acceleration along the x axis relative to gravity
  • y: the acceleration along the y axis relative to gravity
  • z: the acceleration along the z axis relative to gravity

See also: mobileStartTrackingSensor (command),