Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > LoadVars | |||
Object
|
+-LoadVars
public dynamic class LoadVars
extends Object
You can use the LoadVars class to obtain verification of successful data loading and to monitor download progress. The LoadVars class is an alternative to the loadVariables() function for transferring variables between a Flash application and a server.
The LoadVars class lets you send all the variables in an object to a specified URL and to load all the variables at a specified URL into an object. It also lets you send specific variables, rather than all variables, which can make your application more efficient. You can use the LoadVars.onLoad handler to ensure that your application runs when data is loaded, and not before.
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.
Availability: ActionScript 1.0; Flash Player 6
loadVariables function, onLoad (LoadVars.onLoad handler), XML
|
Modifiers |
Property |
Description |
|---|---|---|
|
|
contentType |
The MIME type that is sent to the server when you call |
|
|
loaded |
A Boolean value that indicates whether a |
Properties inherited from class Object
|
Event |
Description |
|---|---|
|
onData |
Invoked when data has completely downloaded from the server or when an error occurs while data is downloading from a server. |
|
onHTTPStatus |
Invoked when Flash Player receives an HTTP status code from the server. |
|
onLoad |
Invoked when a |
|
Signature |
Description |
|---|---|
|
LoadVars |
Creates a LoadVars object. |
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
addRequestHeader |
Adds or changes HTTP request headers (such as |
|
|
decode |
Converts the variable string to properties of the specified LoadVars object. |
|
|
getBytesLoaded |
Returns the number of bytes downloaded by |
|
|
getBytesTotal |
Returns the total number of bytes downloaded by |
|
|
load |
Downloads variables from the specified URL, parses the variable data, and places the resulting variables in |
|
|
send |
Sends the variables in the my_lv object to the specified URL. |
|
|
sendAndLoad |
Posts variables in the |
|
|
toString |
Returns a string containing all enumerable variables in my_lv, in the MIME content encoding application/x-www-form-urlencoded. |
Methods inherited from class Object addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002323.html
Comments
dubnet.co.uk said on Nov 4, 2005 at 8:29 AM : |mantra| said on Jan 15, 2006 at 6:17 AM : tb2000 said on Mar 13, 2006 at 7:51 AM : Linto.K.A. said on Mar 28, 2006 at 8:04 AM : F-r-e-y said on Apr 5, 2006 at 6:33 AM : gevert said on Aug 29, 2006 at 11:49 AM : No screen name said on Sep 5, 2006 at 11:34 AM : wearHD.com said on Oct 6, 2006 at 2:53 PM : Stingwear said on Dec 21, 2006 at 8:48 AM :