LoadVars constructor
public LoadVars()
Creates a LoadVars object. You can then use the methods of that LoadVars object to send and
load data.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example creates a LoadVars object called
var my_lv:LoadVars = new LoadVars();
onData (LoadVars.onData handler)
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. This handler is invoked before the data is parsed and can
be used to call a custom parsing routine instead of the one built in to Flash Player. The value
of the
parameter passed to the function assigned to
src
or a string that contains the URL-encoded name-value pairs downloaded from the
undefined
server. If the
parameter is
src
the server.
The default implementation of
override this default implementation by assigning a custom function to
but
LoadVars.onLoad
.
LoadVars.onData
Availability: ActionScript 1.0; Flash Player 6
Parameters
- A string or
src:String
LoadVars.sendAndLoad()
Example
The following example loads a text file and displays content in a TextArea instance called
when the operation completes. If an error occurs, then information displays in
content_ta
the Output panel.
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
if (src == undefined) {
trace("Error loading content.");
702
ActionScript classes
, an error occurred while downloading the data from
undefined
LoadVars.onData
is not called unless you call it in your implementation of
; the raw (unparsed) data from a
undefined
method call.
:
my_lv
LoadVars.onData
invokes
LoadVars.onLoad
LoadVars.onData
LoadVars.load()
can be either
. You can
,
or
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?