User Guide
88 Server-Side ActionScript Language Reference
The LoadVars class works much like the XML class; it uses the load(), send(), and
sendAndLoad() methods to communicate with a server. The main difference between the
LoadVars class and the XML class is that LoadVars transfers ActionScript name and value
pairs, rather than an XML Document Object Model (DOM) tree stored in the XML object.
The LoadVars class follows the same security restrictions as the XML class.
Method summary for the LoadVars class
Method Description
LoadVars.addRequestHeader() Adds or changes HTTP request headers (such as Content-
Type or SOAPAction) sent with POST actions.
LoadVars.decode() Converts the query string to properties of the specified
LoadVars object
LoadVars.getBytesLoaded() Returns the number of bytes loaded from the last or current
LoadVars.load() or LoadVars.sendAndLoad()method call.
LoadVars.getBytesTotal() Returns the number of total bytes loaded during all
LoadVars.load() or LoadVars.sendAndLoad() method calls.
LoadVars.load()
Downloads variables from the specified URL, parses the
variable data, and places the resulting variables in a
LoadVars object.
LoadVars.send()
Sends the variables in the myLoadVars object to the specified
URL.
LoadVars.sendAndLoad() Posts variables in the myLoadVars object to the specified URL.
LoadVars.toString() Returns a string containing all enumerable variables in
myLoadVars, in the MIME content encoding
application/x-
www-urlform-encoded
.