MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 643

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

The previous code creates a new text field on the Stage and enables text field autosizing.
Next, a LoadVars object is created and two event handlers:
The
onHTTPStatus
LoadVars.load()
passed to the
onHTTPStatus
contains the HTTP status code definition for the current load operation. If the SWF file
was able to successfully load the text file, the value of
status code for "OK"). If the file didn't exist on the server, the value of
to 404 (HTTP status code for "Not Found"). The second event handler,
LoadVars.onLoad()
loaded, the value of the
parameter is set to
method.
3.
Select Control > Test Movie to test the Flash document.
Flash displays an error message to the Output panel stating that it was unable to load the
image because it doesn't exist on the server. The
status code of 404 since the file could not be found on the server, and the
handler sets the
params_txt
If a web server does not return a status code to the Flash Player, the number 0 is
returned to the
event handler is new to Flash Player 8 and is invoked when a
or
LoadVars.sendAndLoad()
event handler function (
, gets called after the file has finished loading. If the file successfully
parameter is set to
success
. Finally, the external file is loaded using the
false
text field's text property to "unable to load text file."
event handler.
onHTTPStatus
onHTTPStatus
operation has completed. The value
httpStatus
httpStatus
, otherwise the
true
event handler traces the
onHTTPStatus
Using HTTP to connect to server-side scripts
and
.
onLoad
in the previous code)
is set to 200 (HTTP
is set
httpStatus
success
LoadVars.load()
event
onLoad
643

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents