GetNetworkStatus fscommand2 Command

GetNetworkStatus

Personalized wallpapers and screensavers for mobile phones

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
GetNetworkStatus

Parameters
None

Value Returned
-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).


Availability: ActionScript 1.0; Flash Lite 1.1

Example

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:
_root.myText += "network status not supported" + "\n";
break;
case 0:
_root.myText += "no network registered" + "\n";
break;
case 1:
_root.myText += "on home network" + "\n";
break;
case 2:
_root.myText += "on extended home network" + "\n";
break;
case 3:
_root.myText += "roaming" + "\n";
break;
}

Back to home