764 Chapter 12: ActionScript Dictionary
When load() 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() method 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 specify your own event handler in place of the
onLoad() method.
Example
The following is a simple example using XML.load():
doc = new XML();
doc.load ("theFile.xml");
See also
XML.loaded
, XML.onLoad()
XML.loaded
Availability
Flash Player 5.
Usage
my_xml.loaded
Description
Property (read-only); determines whether the document-loading process initiated by the
XML.load() call has completed. If the process completes successfully, the method returns true;
otherwise, it returns
false.
Example
The following example uses XML.loaded in a simple script.
if (doc.loaded) {
gotoAndPlay(4);
}
XML.nextSibling
Availability
Flash Player 5.
Usage
my_xml.nextSibling
Description
Property (read-only); evaluates the XML object and references the next sibling in the parent
node’s child list. This method returns
null if the node does not have a next sibling node. This is
a read-only property and cannot be used to manipulate child nodes. Use appendChild(),
insertBefore(), and removeNode() to manipulate child nodes.
See also
XML.appendChild()
, XML.insertBefore(), XML.removeNode()