Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Specific Language Elements > fscommand2() > GetNetworkConnectStatus | |||
Flash Lite 1.1.
Returns a value that indicates the current network connection status.
|
Command |
Parameters |
Value returned |
|---|---|---|
|
|
None. |
-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. |
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) {
case -1 :
/:myText += "connectstatus not supported" add newline;
break;
case 0 :
/:myText += "connectstatus shows active connection" add newline;
break;
case 1 :
/:myText += "connectstatus shows attempting connection" add newline;
break;
case 2 :
/:myText += "connectstatus shows no connection" add newline;
break;
case 3 :
/:myText += "connectstatus shows suspended connection" add newline;
break;
case 4 :
/:myText += "connectstatus shows indeterminable state" add newline;
break;
}
|
|
|
|