
87
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
LoadVars.onLoad()
myLoadVars.onLoad(success){}
Invoked when a LoadVars.load() or LoadVars.sendAndLoad() operation has completed. If the variables load
successfully, the
success parameter is true. If the variables were not received, or if an error occurred in receiving the
response from the server, the
success parameter is false.
If the success parameter is true, the myLoadVars object is populated with variables downloaded by the
LoadVars.load() or LoadVars.sendAndLoad() operation, and these variables are available when the onLoad()
handler is invoked.
Availability
Flash Media Server 2
Parameters
success A boolean value indicating whether the LoadVars.load() operation ended in success (true) or failure
(
false).
Example
The following example creates a new LoadVars object, attempts to load variables into it from a remote URL, and prints
the result:
myLoadVars = new LoadVars();
myLoadVars.onLoad = function(result){
trace("myLoadVars load success is " + result);
}
myLoadVars.load("http://www.someurl.com/somedata.txt");
LoadVars.send()
myLoadVars.send(url [, target, method])
Sends the variables in the myLoadVars object to the specified URL. All enumerable variables in the myLoadVars object
are concatenated into a string that is posted to the URL by using the HTTP
POST method.
The MIME content type sent in the HTTP request headers is the value of LoadVars.contentType.
Availability
Flash Media Server 2
Parameters
url A string; the URL to which to upload variables.
target A File object. If you use this optional parameter, any returned data is output to the specified File object. If this
parameter is omitted, the response is discarded.
method A string indicating the GET or POST method of the HTTP protocol. The default value is POST. This parameter
is optional.
Returns
A boolean value indicating success (true) or failure (false).
Comentários a estes Manuais