MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 96

Server-side actionscript language reference
Table of Contents

Advertisement

Example
The following example loads a text file and displays content in a TextArea instance called
when the operation completes. If an error occurs, then information displays in
content_ta
the Output panel. If an error occurs, then information writes to the log file.
var my_lv = new LoadVars();
my_lv.onData = function(src) {
if (src == undefined) {
trace("Error loading content.");
return;
}
content_ta.text = src;
};
my_lv.load("content.txt", my_lv, "GET");
LoadVars.onHTTPStatus
Availability
Flash Media Server 2.
Usage
myLoadVars.onHTTPStatus(httpStatus){}
Parameters
A number; the HTTP status code returned by the server. For example, a value
httpStatus
of 404 indicates that the server has not found a match for the requested URI. HTTP status
codes can be found in sections 10.4 and 10.5 of the
Description
Event handler; invoked when Flash Media Server receives an HTTP status code from the
server. This handler lets you capture and act on HTTP status codes.
The
handler is invoked before
onHTTPStatus
value of
if the load fails. After
undefined
triggered, whether or not you override
handler, you should write a function to catch the result of the
then use the result in your
indicates that FMS did not try to make the URL request.
If Flash Media Server cannot get a status code from the server, or if it cannot communicate
with the server, the default value of 0 is passed to your ActionScript code.
96
Server-Side ActionScript Language Reference
onData
onHTTPStatus
onHTTPStatus
and
handlers. If
onData
onLoad
HTTP
specification.
, which triggers calls to
is triggered,
onData
. To best use the
onHTTPStatus
onHTTPStatus
onHTTPStatus
with a
onLoad
is always
call; you can
is not invoked, this

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents