Package | com.myflashlab.air.extensions.vibration |
Class | public class Vibration |
Inheritance | Vibration Object |
Method | Defined By | ||
---|---|---|---|
cancel():void [static]
Cancel ongoing vibration on Android. | Vibration | ||
hasVibrator():Boolean [static]
Check whether the hardware has a vibrator. | Vibration | ||
init():void [static]
To use this extension, you must first initialize it with this method. | Vibration | ||
vibrate($duration:int = 500):void [static]
Vibrate constantly for the specified period of time on Android. | Vibration | ||
vibratePattern($pattern:Array, $repeat:int):void [static]
Vibrate with a given pattern on Android. | Vibration |
Constant | Defined By | ||
---|---|---|---|
DREAM_THEATER_FATAL_TRAGEDY : Array [static] | Vibration | ||
DREAM_THEATER_OVERTURE_1928_INTRO : Array [static] | Vibration | ||
DREAM_THEATER_STRANGE : Array [static] | Vibration | ||
EXTENSION_ID : String = com.myflashlab.air.extensions.vibration [static] | Vibration | ||
FINAL_FANTASY_VICTORY_FANFARE : Array [static] | Vibration | ||
FIVE_REPEAT : int = 5 [static] | Vibration | ||
FOUR_REPEAT : int = 4 [static] | Vibration | ||
GO_GO_POWER_RANGERS : Array [static] | Vibration | ||
GRAVEL_ROAD : Array [static] | Vibration | ||
INFINITY_REPEAT : int = 0 [static] | Vibration | ||
JAMES_BAND_007 : Array [static] | Vibration | ||
KARNIVOOL_COTE : Array [static] | Vibration | ||
MICHAEL_JACKSON_SMOOTH_CRIMINAL : Array [static] | Vibration | ||
MORSE_CODE_SOS : Array [static] | Vibration | ||
MORTAL_KOMBAT_THEME : Array [static] | Vibration | ||
MUSE_MADNESS : Array [static] | Vibration | ||
NO_REPEAT : int = -1 [static] | Vibration | ||
ONE_REPEAT : int = 1 [static] | Vibration | ||
PAIN_OF_SALVATION_NIHIL_MORARI : Array [static] | Vibration | ||
SHAVE_AND_A_HAIRCUT : Array [static] | Vibration | ||
STAR_WARS_IMPERIAL_MARCH : Array [static] | Vibration | ||
SUPER_MARIO_THEME_INTRO : Array [static] | Vibration | ||
TEENAGE_MUTANT_NINJA_TURTLES : Array [static] | Vibration | ||
TESSERACT_NOCTURNE : Array [static] | Vibration | ||
TESSERACT_PERFECTION : Array [static] | Vibration | ||
THREE_REPEAT : int = 3 [static] | Vibration | ||
TWO_REPEAT : int = 2 [static] | Vibration | ||
VERSION : String = 0.0.1 [static] | Vibration | ||
VOLTRON_THEME : Array [static] | Vibration |
cancel | () | method |
public static function cancel():void
Cancel ongoing vibration on Android.
Vibration.vibrate(duration: 10000); Vibration.cancel();
hasVibrator | () | method |
public static function hasVibrator():Boolean
Check whether the hardware has a vibrator.
if (Vibration.hasVibrator()) { Vibration.vibrate(); }
Boolean — Boolean
|
init | () | method |
public static function init():void
To use this extension, you must first initialize it with this method.
vibrate | () | method |
public static function vibrate($duration:int = 500):void
Vibrate constantly for the specified period of time on Android. Vibrate for default period of 500 milliseconds on iOS.
Vibration.vibrate(); Vibration.vibrate(1000);
Parameters
$duration:int (default = 500 ) — The number of milliseconds to vibrate.
|
vibratePattern | () | method |
public static function vibratePattern($pattern:Array, $repeat:int):void
Vibrate with a given pattern on Android.
Vibration.vibratePattern(Vibration.SUPER_MARIO_THEME_INTRO, Vibration.TWO_REPEAT); pattern: Array = [0, 150, 150, 150, 150, 75, 75, 150, 150, 150, 150, 450]; Vibration.vibratePattern(pattern, Vibration.NO_REPEAT);
Parameters
$pattern:Array — an array of longs of times for which to turn the vibrator on or off.
| |
$repeat:int — the index into pattern at which to repeat, or -1 if you don't want to repeat.
|
DREAM_THEATER_FATAL_TRAGEDY | Constant |
public static const DREAM_THEATER_FATAL_TRAGEDY:Array
DREAM_THEATER_OVERTURE_1928_INTRO | Constant |
public static const DREAM_THEATER_OVERTURE_1928_INTRO:Array
DREAM_THEATER_STRANGE | Constant |
public static const DREAM_THEATER_STRANGE:Array
EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.vibration
FINAL_FANTASY_VICTORY_FANFARE | Constant |
public static const FINAL_FANTASY_VICTORY_FANFARE:Array
FIVE_REPEAT | Constant |
public static const FIVE_REPEAT:int = 5
FOUR_REPEAT | Constant |
public static const FOUR_REPEAT:int = 4
GO_GO_POWER_RANGERS | Constant |
public static const GO_GO_POWER_RANGERS:Array
GRAVEL_ROAD | Constant |
public static const GRAVEL_ROAD:Array
INFINITY_REPEAT | Constant |
public static const INFINITY_REPEAT:int = 0
JAMES_BAND_007 | Constant |
public static const JAMES_BAND_007:Array
KARNIVOOL_COTE | Constant |
public static const KARNIVOOL_COTE:Array
MICHAEL_JACKSON_SMOOTH_CRIMINAL | Constant |
public static const MICHAEL_JACKSON_SMOOTH_CRIMINAL:Array
MORSE_CODE_SOS | Constant |
public static const MORSE_CODE_SOS:Array
MORTAL_KOMBAT_THEME | Constant |
public static const MORTAL_KOMBAT_THEME:Array
MUSE_MADNESS | Constant |
public static const MUSE_MADNESS:Array
NO_REPEAT | Constant |
public static const NO_REPEAT:int = -1
ONE_REPEAT | Constant |
public static const ONE_REPEAT:int = 1
PAIN_OF_SALVATION_NIHIL_MORARI | Constant |
public static const PAIN_OF_SALVATION_NIHIL_MORARI:Array
SHAVE_AND_A_HAIRCUT | Constant |
public static const SHAVE_AND_A_HAIRCUT:Array
STAR_WARS_IMPERIAL_MARCH | Constant |
public static const STAR_WARS_IMPERIAL_MARCH:Array
SUPER_MARIO_THEME_INTRO | Constant |
public static const SUPER_MARIO_THEME_INTRO:Array
TEENAGE_MUTANT_NINJA_TURTLES | Constant |
public static const TEENAGE_MUTANT_NINJA_TURTLES:Array
TESSERACT_NOCTURNE | Constant |
public static const TESSERACT_NOCTURNE:Array
TESSERACT_PERFECTION | Constant |
public static const TESSERACT_PERFECTION:Array
THREE_REPEAT | Constant |
public static const THREE_REPEAT:int = 3
TWO_REPEAT | Constant |
public static const TWO_REPEAT:int = 2
VERSION | Constant |
public static const VERSION:String = 0.0.1
VOLTRON_THEME | Constant |
public static const VOLTRON_THEME:Array