XML 1299
<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.
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.
You can define a custom function that executes when the
onLoad
event handler of the XML
object is invoked.
When using this method, consider the Flash Player security model:
For Flash Player 8:
■
Data loading is not allowed if the calling SWF file is in the local-with-file-system sandbox
and the target resource is from a network sandbox.
■
Data loading is also not allowed if the calling SWF file is from a network sandbox and the
target resource is local.
NO
T
E
If a file being loaded contains non-ASCII characters (as found in many non-English
languages), it is recommended that you save the file with UTF-8 or UTF-16 encoding as
opposed to a non-Unicode format like ASCII.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...