Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:How to check network status in Flash Lite 1.1

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

Article Metadata
Created: narender_raul (26 May 2008)
Last edited: hamishwillee (14 May 2013)

In Flash Lite applications connecting to Internet, it is useful to check the network status, while making the connection.

  • If connection is being established or not
  • If connection failed Network error
  • If there is DNS Failure
  • If no HTTP request has been made

In Flash Lite 1.1 GetNetworkRequestStatus command returns a value indicating the current status of the most recent HTTP request. It can be any of the following values.

  • -1: The command is not supported.
  • 0: There is a pending request, a network connection has been established, the server's host name has been resolved, and a connection to the server has been made.
  • 1: There is a pending request, and a network connection is being established.
  • 2: There is a pending request, but a network connection has not yet been established.
  • 3: There is a pending request, a network connection has been established, and the server's host name is being resolved.
  • 4: The request failed because of a network error.
  • 5: The request failed because of a failure in connecting to the server.
  • 6: The server has returned an HTTP error.
  • 7: The request failed because of a failure in accessing the DNS server or in resolving the server name.
  • 8: The request has been successfully fulfilled.
  • 9: The request failed because of a timeout.
  • 10: The request has not yet been made.


You want to show loading with animation and some time count.

  • Add this ActionScript code in the first frame
/:timerCount = "30";
/:requeststatus = fscommand2("GetNetworkRequestStatus");
  • Type loading text with animated movie clip
  • Load variable HTTP path.
loadVariables("", "", "GET");
  • Check the request of HTTP status
if (/:timerCount>=0) {

As GetNetworkRequestStatus returns 12 status values, you have to use switch statement to update a text with the current status in final_status.

switch (/:requeststatus) {
case -1 :
/:final_status = "Request status not supported" add "\n";
case 0 :
/:final_status = "Connection to server has been made" add "\n";
case 1 :
/:final_status = "Connection is being established" add "\n";
case 2 :
/:final_status = "Pending request, contacting network" add "\n";
case 3 :
/:final_status = "Pending request, resolving domain" "\n";
case 4 :
/:final_status = "Failed, network error" add "\n";
case 5 :
/:final_status = "Failed, couldn't reach server" add "\n";
case 6 :
/:final_status = "HTTP error" add "\n";
case 7 :
/:final_status = "DNS failure" add "\n";
case 8 :
/:final_status = "Request has been fulfilled" add "\n";
case 9 :
/:final_status = "Request timed out" add "\n";
case 10 :
/:final_status = "No HTTP request has been made" add "\n";

Further Reading

Oxygen Toolkit

--Narendar Raul

This page was last modified on 14 May 2013, at 06:12.
53 page views in the last 30 days.