98
Server-Side ActionScript Language Reference
LoadVars.onLoad
Availability
Flash Media Server 2.
Usage
myLoadVars
.onLoad(
success
){}
Parameters
success
A Boolean value indicating whether the
LoadVars.load()
operation ended in
success (
true
) or failure (
false
).
Description
Event handler; 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
loadVarsObject
is populated with variables
downloaded by the
LoadVars.load()
or
LoadVars.sendAndLoad()
operation, and these
variables are available when the
onLoad
handler is invoked.
This method is undefined by default, but you can define it by assigning it a callback function.
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()
Availability
Flash Media Server 2.
Usage
myLoadVars
.send(
url
[,
target
,
method
])