03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See also<br />

appendChild (XMLNode.appendChild method), insertBefore (XMLNode.insertBefore<br />

method), removeNode (XMLNode.removeNode method), hasXMLSocket<br />

(capabilities.hasXMLSocket property)<br />

previousSibling (XMLNode.previousSibling property)<br />

public previousSibling : XMLNode [read-only]<br />

An XMLNode value that references the previous sibling in the parent node's child list. The<br />

property has a value of null if the node does not have a previous sibling node. This property<br />

cannot be used to manipulate child nodes; use the appendChild(), insertBefore(), <strong>and</strong><br />

removeNode() methods to manipulate child nodes.<br />

Example<br />

The following example is an excerpt from the example for the XML.lastChild property, <strong>and</strong><br />

shows how you can use the XML.previousSibling property to loop through an XML node's<br />

child nodes:<br />

for (var aNode:XMLNode = rootNode.lastChild; aNode != null; aNode =<br />

aNode.previousSibling) {<br />

trace(aNode);<br />

}<br />

See also<br />

lastChild (XMLNode.lastChild property), appendChild (XMLNode.appendChild<br />

method), insertBefore (XMLNode.insertBefore method), removeNode<br />

(XMLNode.removeNode method), hasXMLSocket (capabilities.hasXMLSocket<br />

property)<br />

removeNode (XMLNode.removeNode method)<br />

public removeNode() : Void<br />

Removes the specified XML object from its parent. Also deletes all descendants of the node.<br />

Example<br />

The following example creates an XML packet, <strong>and</strong> then deletes the specified XML object<br />

<strong>and</strong> its descendant nodes:<br />

var xml_str:String = "San Francisco";<br />

var my_xml:XML = new XML(xml_str);<br />

712 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!