![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.
The LoadVars class is an alternative to the loadVariables()
function for transferring variables between a Flash application and a server.
You can use the LoadVars class to obtain verification of successful data loading, progress indications, and stream data while it downloads. The LoadVars class works much like the XML class; it uses the methods load()
, send()
, and sendAndLoad()
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 DOM tree stored in the XML object.
The LoadVars class follows the same security restrictions as the XML class.
Method |
Description |
---|---|
Adds or changes HTTP headers for |
|
Returns the number of bytes downloaded by |
|
Returns the total number of bytes that will be downloaded by a |
|
Downloads variables from a specified URL. |
|
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. |
Property |
Description |
---|---|
Indicates the MIME type of the data. |
|
A Boolean value that indicates whether a |
Event handler |
Description |
---|---|
Invoked when data has been completely downloaded from the server, or when an error occurs while data is downloading from a server. |
|
Invoked when a |
Flash Player 6.
new LoadVars
()
None.
Nothing.
Constructor; creates a LoadVars object. You can then use the methods of that LoadVars object to send and load data.
The following example creates a LoadVars object called my_lv
:
var my_lv = new LoadVars();
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |