MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 190

Server-side actionscript language reference
Table of Contents

Advertisement

Example
The following example uses the
of an XMLNode object, starting with the last item in the node's child list and ending with the
first child of the node's child list:
// Create a new XML document.
var doc = new XML();
// Create a root node.
var rootNode = doc.createElement("rootNode");
// Create three child nodes.
var oldest = doc.createElement("oldest");
var middle = doc.createElement("middle");
var youngest = doc.createElement("youngest");
// Add the rootNode as the root of the XML document tree.
doc.appendChild(rootNode);
// Add each of the child nodes as children of rootNode.
rootNode.appendChild(oldest);
rootNode.appendChild(middle);
rootNode.appendChild(youngest);
// Use lastChild to iterate through the child nodes of rootNode.
for (var aNode = rootNode.lastChild; aNode != null; aNode =
aNode.previousSibling) {
trace(aNode);
}
/*
output:
<youngest />
<middle />
<oldest />
*/
In Flash Media Server, the output of
file and Application inspector.
190
Server-Side ActionScript Language Reference
property to iterate through the child nodes
XML.lastChild
statements appears in the application log
trace()

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents