forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccelerationChanged.lcdoc
More file actions
49 lines (33 loc) · 1.16 KB
/
Copy pathaccelerationChanged.lcdoc
File metadata and controls
49 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Name: accelerationChanged
Type: message
Syntax: accelerationChanged <pXAccel>, <pYAccel>, <pZAccel>
Summary:
Sent to the current card of the defaultStack at the interval specified
by the mobileEnableAccelerometer command.
Introduced: 4.5.2
OS: ios, android
Platforms: mobile
Example:
on accelerationChanged pXAccel, pYAccel, pZAccel
-- display the acceleration along the x axis
put pXAccel into tXAxisAcceleration
end accelerationChanged
Parameters:
pXAccel:
the acceleration along the x axis relative to gravity
pYAccel:
the acceleration along the y axis relative to gravity
pZAccel:
the acceleration along the z axis relative to gravity
Description:
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.
References: mobileStopTrackingSensor (command),
mobileStartTrackingSensor (command)
Tags: ui