User Guide

228 ActionScript language elements
Example
The following example sets the size of the display area to the full screen:
status = fscommand2("FullScreen", true);
GetBatteryLevel fscommand2 Command
GetBatteryLevel
Returns the current battery level. It is a numeric value that ranges from 0 to the maximum
value returned by the GetMaxBatteryLevel variable.
Availability: ActionScript 1.0; Flash Lite 1.1
Example
The following example sets the battLevel variable to the current level of the battery:
battLevel = fscommand2("GetBatteryLevel");
GetDevice fscommand2 Command
GetDevice
Sets a parameter that identifies the device on which Flash Lite is running. This identifier is
typically the model name.
Availability: ActionScript 1.0; Flash Lite 1.1
Example
The following example assigns the device identifier to the device variable:
status = fscommand2("GetDevice", "device");
Command Parameters Value Returned
GetBatteryLevel None. -1: Not supported Other numeric values: The
current battery level.
Command Parameters Value Returned
GetDevice device String to receive
the identifier of the device.
It can be either the name of
a variable or a string value
that contains the name of a
variable.
-1: Not supported. 0: Supported.