Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / August 2005



Tip: Looking for answers? Try searching our database.

XML to Flash Tree

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nicky2005 - 23 Aug 2005 12:22 GMT
Hi,

I'm using XML to build a tree in Flash MX using the following code. The code
that opens a node, assigns an icon and sets the node as a branch is not
working. If anyone can help I would appreciate it.

<?xml version="1.0" encoding="iso-8859-1"?>
<node id = "0" open="Y" label="property" level="0">
<node ref="0" id = "260" icon="house"  isBranch="true"    open="Y"
label="Changeover          0" level = "1"/>
<node  ref="1" id = "260" icon="house"   isBranch="true"    open="Y"
label="Changeover                                                  1" level =
"1">
<node ref="2" id = "1664" icon="house"  label="Sold By" level = "2"/>
<node ref="3" id = "1664" icon="house"  label="Sold By" level = "2"/>
</node>
<node ref="4" id = "260" icon="house"  isBranch="true"   open="Y"
label="Changeover          4" level = "1">
<node ref="5" id = "25003" icon="house"  label="Ouch" level = "2"/>
</node>
<node ref="6" id = "260" icon="house"  isBranch="true"   open="Y"
label="Changeover          6" level = "1">
<node ref="7" id = "25002" icon="house"  label="Now" level = "2"/>
</node>
<node ref="8" id = "101" icon="house"  isBranch="true"   open="Y"
label="STANDARD          8" level = "1">
<node ref="9" id = "1661" icon="house"  label="Sold Subject to Contract" level
= "2"/>
</node>
</node>
Rajesh199 - 27 Aug 2005 08:08 GMT
hey !
use this code!!
//

var myTreeDP:XML = new XML();
myTreeDP.ignoreWhite = true;
myTreeDP.load("tree.xml");
myTreeDP.onLoad = function() {
    myTree.dataProvider = this.firstChild;
};
var treeListener:Object = new Object();
treeListener.change = function(evt:Object) {
    trace("selected node is: "+evt.target.selectedNode);
   
};
myTree.addEventListener("change", treeListener);

////
Rajesh
:D
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.