Motion
Summary
Class for shake(devicemotion) functionality.
Constructor
Motion
Syntax
Motion
()
Summary
Example:
var motion = new Motion();
motion.shake(onShake);
function onShake() {
trace("shake detected");
}
Methods
shake
Syntax
shake
(
-
callback
-
[threshold = 10]
-
[interval = 1000]
Summary
Function to detect shake motion.
Parameters:
-
callback
Function -
[threshold = 10]
Int optional -
[interval = 1000]
Int optional
stopShake
Syntax
stopShake
()
Summary
Function to stop shake motion detection.