Macromedia flash mx professional 2004-macromedia flash lite 1.1 authoring guidelines Benutzerhandbuch

Seite von 86
40
Chapter 5:  New FSCommand and FSCommand2 commands
StopVibrate()
The 
StopVibrate()
 function stops the current vibration, if any.
This function is executed immediately upon invocation. If this function is not supported, a value 
of -1 is returned.
Syntax
status = FSCommand2( "StopVibrate” )
Return value
A value of -1 if the function is not supported; 0 if the vibration is stopped.
Power
The commands in this section provide the mobile phone’s power information to Flash content on 
the mobile phone. 
GetBatteryLevel()
The 
GetBatteryLevel()
 function returns the current battery level. It is a numeric value, in the 
range of 0 to the maximum value returned by the 
GetMaxBatteryLevel()
.
This function is executed immediately upon invocation. If this function is not supported, a value 
of -1 is returned.
Syntax
status = FSCommand2( "GetBatteryLevel” )
Return value
A value of -1 if not supported; otherwise, the battery level, returned as a number.
GetMaxBatteryLevel()
The 
GetMacBatteryLevel()
 function returns the maximum battery level of the mobile phone. 
It is a numeric value greater than zero.
This function is executed immediately upon invocation. If the 
GetMacBatteryLevel()
 function 
is not supported, a value of -1 is returned.
Syntax
status = FSCommand2( "GetMaxBatteryLevel” )
Return value
A value of -1 if the function is not supported; otherwise, the maximum battery level, returned as a 
number.