G-L > LoadVars (object) |
![]() ![]() ![]() |
LoadVars (object)
The LoadVars object is an alternative to the loadVariables
action for transferring variables between a Flash movie and a server.
You can use the LoadVars object to obtain error information, progress indications, and stream data while it downloads. The LoadVars object works much like the XML object; it uses the methods load
, send
, and sendAndLoad
to communicate with a server. The main difference between the LoadVars object and the XML object is that LoadVars transfers ActionScript name and value pairs, rather than an XML DOM tree stored in the XML object.
The LoadVars object follows the same security restrictions as the XML object.
You must use the constructor new LoadVars()
to create an instance of the LoadVars object before calling its methods.
The LoadVars object is supported by Flash Player 6 and later.
Method Description Downloads variables from a specified URL. Returns the number of bytes loaded from a Returns the total number of bytes that will be downloaded by a Posts variables from a LoadVars object to a URL. Posts variables from a LoadVars object to a URL and downloads the server's response to a target object. Returns a URL encoded string that contains all the enumerable variables in the LoadVars object.
Method summary for the LoadVars object
load
or sendAndLoad
method.
load
or sendAndLoad
method.
Property summary for the LoadVars object
All of the properties for the Key object are constants.
Property |
Description |
---|---|
Indicates the MIME type of the data. |
|
A Boolean value that indicates whether a |
Method Description Invoked when a
Event summary for the LoadVars object
load or sendAndLoad
operation has completed.
Constructor for the LoadVars object
Availability
Flash Player 6.
Usage
new LoadVars
()
Parameters
None.
Returns
Nothing.
Description
Constructor; creates an instance of the LoadVars object. You can then use the methods of that LoadVars object to send and load data.
Example
The following example creates an instance of the LoadVars object called myLoadVars
:
myLoadVars = new LoadVars();
![]() ![]() ![]() |