GetNetworkConnectStatus fscommand2 Command

GetNetworkConnectStatus

Personalized wallpapers and screensavers for mobile phones

Returns a value that indicates the current network connection status.

Command
GetNetworkConnectStatus

Parameters
None

Value Returned
-1: Not supported.
0: There is currently an active network connection.
1: The device is attempting to connect to the network.
2: There is currently no active network connection.
3: The network connection is suspended.
4: The network connection cannot be determined.

Availability: ActionScript 1.0; Flash Lite 1.1

Example

The following example assigns the network connection status to the connectstatus variable, and then uses a switch statement to update a text field with the status of the connection:
connectstatus = FSCommand2("GetNetworkConnectStatus");
switch (connectstatus) {
connectstatus = FSCommand2("GetNetworkConnectStatus");
switch (connectstatus) {
connectstatus = FSCommand2("GetNetworkConnectStatus");
switch (connectstatus) {
case -1 :
_root.myText += "connectstatus not supported" + "\n";
break;
case 0 :
_root.myText += "connectstatus shows active connection" + "\n";
break;
case 1 :
_root.myText += "connectstatus shows attempting connection" + "\n";
break;
case 2 :
_root.myText += "connectstatus shows no connection" + "\n";
break;
case 3 :
_root.myText += "connectstatus shows suspended connection" + "\n";
break;
case 4 :
_root.myText += "connectstatus shows indeterminable state" + "\n";
break;
}

Back to Flash Lite home