MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 70

Actionscript language reference
Table of Contents

Advertisement

The LoadVars class was introduced in Flash Player 6 to provide a cleaner, more object-oriented
interface for the common task of exchanging CGI data with a web server. Advantages of the
LoadVars class include the following:
You don't need to create container movie clips for holding data or clutter existing movie clips
with variables specific to client/server communication.
The class interface is similar to the XML object, which provides some consistency in
ActionScript. It uses the methods
communication with a server. The main difference between the LoadVars and XML classes is
that the LoadVars data is a property of the LoadVars object, rather than an XML Document
Object Model (DOM) tree stored in the XML object.
The class interface is more straightforward—with methods named
sendAndLoad
You can get additional information about the communication, using the
getBytesTotal
You can get progress information about the download of your data (although you can't access
the data until it is fully downloaded).
The callback interface is through ActionScript methods (
deprecated
onClipEvent
There are error notifications.
You can add custom HTTP request headers.
You must create a LoadVars object to call its methods. This object is a container to hold the
loaded data.
For more information, see the
About XML
Extensible Markup Language (XML) is becoming the standard for exchanging structured data in
Internet applications. You can integrate data in Flash with servers that use XML technology to
build sophisticated applications, such as chat or brokerage systems.
In XML, as with HTML, you use tags to specify, or mark up, a body of text. In HTML, you use
predefined tags to indicate how text should appear in a web browser (for example, the
indicates that text should be bold). In XML, you define tags that identify the type of a piece of
data (for example,
information from the way it appears, so the same XML document can be used and reused in
different environments.
Every XML tag is called a node, or an element. Each node has a type (1, which indicates an XML
element, or 3, which indicates a text node), and elements might also have attributes. A node
nested in a node is called a child node. This hierarchical tree structure of nodes is called the XML
DOM—much like the JavaScript DOM, which is the structure of elements in a web browser.
70
Chapter 3: Working with External Data
load()
—than the older loadVariables interface.
methods
(data) approach required for loadVariables.
LoadVars class
<password>VerySecret</password>
,
, and
send()
sendAndLoad()
onLoad
entry.
). XML separates the structure of the
to initiate
,
,
load
send
getBytesLoaded
) instead of the obsolete,
<b>
and
tag

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents