Man... i figured why it didn't work in the browser.
I had to close the browser and reopen it. Just refreshing it doesn't clear reiniialize the tree and xml correctly.
Thanks
SO IT WORKS!!
HERE IS THE CODE FOR EVERYONE ELSE
Code:// tree component - instance name = theTree // scrollpane component - instance name = thePane // create xml file - with file name = "images.xml" //<tree> // <folder label="Flash swf 1"> // <node label="swf 1" data="image1.swf" /> // </folder> // <folder label="Flash swf 2"> // <node label="swf 2" data="image2.swf" /> // </folder> // <folder label="My Bookmarks"> // <node label="Adobe Web site" url="http://www.adobe.com" /> // </folder> //</tree> var xml:XML = new XML(); xml.ignoreWhite = true; xml.onLoad = function() { theTree.dataProvider = this.firstChild; theTree.setIsOpen(theTree.getTreeNodeAt(0), true); // set nodes open theTree.setIsOpen(theTree.getTreeNodeAt(1), true); theTree.setIsOpen(theTree.getTreeNodeAt(2), true); } xml.load("images.xml"); var treeObj:Object = new Object(); treeObj.change = function(){ var OK:Boolean = true; var itemSelected = theTree.selectedItem.attributes; theData = itemSelected.data; trace(theData); theURL = itemSelected.url; trace(theURL); if(theURL == undefined && theData == undefined){ OK = false; thePane.contentPath = null; } if(theData != undefined && OK){ thePane.contentPath = theData; } if(theURL != undefined && OK){ getURL(theURL, "_blank"); } } theTree.addEventListener("change", treeObj)





Reply With Quote