XML
727
// set the ignoreWhite property to false (default value)
flooring.ignoreWhite = false;
...
// output (line breaks added for clarity):
<house>
<kitchen> ceramic tile </kitchen>
<bathroom>linoleum</bathroom>
<foyer> </foyer>
</house>
The XML_blogTracker.fla and XML_languagePicker.fla files in the ActionScript samples
folder also contain a code example. The following are typical paths to this folder:
■
Windows:
boot drive
\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
■
Macintosh:
Macintosh HD
/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
load (XML.load method)
public load(url:
String
) : Boolean
Loads an XML document from the specified URL, and replaces the contents of the specified
XML object with the downloaded XML data. The URL is relative and is called using HTTP.
The load process is asynchronous; it does not finish immediately after the
load()
method is
executed.
In SWF files running in a version of the player earlier than Flash Player 7, the
url
parameter
must be in the same superdomain as the SWF file that issues this call. A
superdomain
is
derived by removing the leftmost component of a file's URL. For example, a SWF file at
www.someDomain.com can load data from sources at store.someDomain.com, because both
files are in the same superdomain of someDomain.com.
In SWF files of any version running in Flash Player 7 or later, the
url
parameter must be in
exactly the same domain. For example, a SWF file at www.someDomain.com can load data
only from sources that are also at www.someDomain.com. If you want to load data from a
different domain, you can place a
cross-domain policy file
on the server that is hosting the
SWF file.
When the
load()
method is executed, the XML object property
loaded
is set to
false
.
When the XML data finishes downloading, the
loaded
property is set to
true
, and the
onLoad
event handler is invoked. The XML data is not parsed until it is completely
downloaded. If the XML object previously contained any XML trees, they are discarded.
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...