Flash Lite 2.x and 3.0 ActionScript Language Reference

GetMaxBatteryLevel fscommand2 Command

GetMaxBatteryLevel

Returns the maximum battery level of the device. It is a numeric value greater than 0.

Note: This command is not supported for BREW devices.

Command

Parameters

Value Returned

GetMaxBatteryLevel

None

-1: Not supported.
Other values: The maximum battery level.

Example

The following example sets the the maxBatt variable to the maximum battery level:

maxBatt = fscommand2("GetMaxBatteryLevel");