LoadVars
693
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
See also
loadVariables function
,
onLoad (LoadVars.onLoad handler)
,
XML
Property summary
Properties inherited from class Object
Event summary
Modifiers
Property
Description
contentType
:String
The MIME type that is sent to the server when you call
LoadVars.send()
or
LoadVars.sendAndLoad()
.
loaded
:Boolean
A Boolean value that indicates whether a
load
or
sendAndLoad
operation has completed,
undefined
by default.
constructor (Object.constructor property)
,
__proto__ (Object.__proto__
property)
,
prototype (Object.prototype property)
,
__resolve
(Object.__resolve property)
Event
Description
onData
= function(src:String) {}
Invoked when data has completely downloaded from the
server or when an error occurs while data is
downloading from a server.
onHTTPStatus
=
function(httpStatus:Number) {}
Invoked when Flash Player receives an HTTP status
code from the server.
onLoad
=
function(success:Boolean) {}
Invoked when a
LoadVars.load()
or
LoadVars.sendAndLoad()
operation has ended.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...