Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Specific Language Elements > fscommand2() > GetNetworkStatus | |||
Flash Lite 1.1.
Returns a value indicating the network status of the phone (that is, whether there is a network registered and whether the phone is currently roaming).
|
Command |
Parameters |
Value returned |
|---|---|---|
|
|
None. |
-1: The command is not supported. 0: No network registered. 1: On home network. 2: On extended home network. 3: Roaming (away from home network). |
The following example assigns the status of the network connection to the networkstatus variable, and then uses a switch statement to update a text field with the status:
networkstatus = fscommand2("GetNetworkStatus");
switch(networkstatus) {
case -1:
/:myText += "network status not supported" add newline;
break;
case 0:
/:myText += "no network registered" add newline;
break;
case 1:
/:myText += "on home network" add newline;
break;
case 2:
/:myText += "on extended home network" add newline;
break;
case 3:
/:myText += "roaming" add newline;
break;
}
|
|
|
|