LoadVars class
315
LoadVars class
Availability
Flash Player 6.
Description
You can use the LoadVars class to obtain verification of successful data loading and to monitor
download progress. The LoadVars class lets you send all the variables in an object to a specified
URL and load all the variables at a specified URL into an object. It also lets you send specific
variables, rather than all the 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 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.
For information about using the LoadVars class and example code, see
“Using the LoadVars class”
on page 69
.
Method summary for the LoadVars class
Method
Description
LoadVars.addRequestHeader()
Adds or changes HTTP headers for
POST
operations.
LoadVars.decode()
Converts a variable string to properties of the specified LoadVars
object.
LoadVars.getBytesLoaded()
Returns the number of bytes downloaded by
LoadVars.load()
or
LoadVars.sendAndLoad()
.
LoadVars.getBytesTotal()
Returns the total number of bytes that will be downloaded by a
load
or
sendAndLoad
method.
LoadVars.load()
Downloads variables from a specified URL.
LoadVars.send()
Posts variables from a LoadVars object to a URL.
LoadVars.sendAndLoad()
Posts variables from a LoadVars object to a URL and downloads
the server’s response to a target object.
LoadVars.toString()
Returns a URL-encoded string that contains all the enumerable
variables in the LoadVars object.
CHAPTER 6
ActionScript Core Classes
Summary of Contents for FLEX-FLEX ACTIONSCRIPT LANGUAGE
Page 1: ...Flex ActionScript Language Reference...
Page 8: ......
Page 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Page 76: ......
Page 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Page 135: ...case 135 See also break default strict equality switch...
Page 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Page 808: ...808 Chapter 7 ActionScript for Flash...
Page 810: ...810 Appendix A Deprecated Flash 4 operators...
Page 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Page 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Page 822: ...822 Index...