Getnetworkrequeststatus Fscommand2 Command - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

GetNetworkRequestStatus fscommand2 Command

GetNetworkRequestStatus
Returns a value indicating the status of the most recent HTTP request.
Command
GetNetworkRequestStatus
Availability: ActionScript 1.0; Flash Lite 1.1
Example
The following example assigns the status of the most recent HTTP request to the
variable, and then uses a
requesttatus
status:
requeststatus = fscommand2("GetNetworkRequestStatus");
switch (requeststatus) {
case -1:
_root.myText += "requeststatus not supported" + "\n";
break;
case 0:
_root.myText += "connection to server has been made" + "\n";
break;
case 1:
_root.myText += "connection is being established" + "\n";
break;
234
ActionScript language elements
Parameters Value Returned
None
: The command is not supported.
-1
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.
and a network connection is being
established.
a network connection has not yet been
established.
network connection has been established,
and the server's host name is being resolved.
: The request failed because of a network
4
error.
in connecting to the server.
returned an HTTP error (for example, 404).
The request failed because of a failure in
accessing the DNS server or in resolving the
server name.
successfully fulfilled.
because of a timeout.
yet been made.
statement to update a text field with the
switch
: There is a pending request,
1
: There is a pending request, but
2
: There is a pending request, a
3
: The request failed because of a failure
5
: The request has been
8
: The request failed
9
: The request has not
10
: There is
0
: The server has
6
:
7

Advertisement

Table of Contents
loading

Table of Contents