Groups | Blog | Home
all groups > macromedia flash sitedesign > august 2005 >

macromedia flash sitedesign : Custom XML Tree Component Issues: HELP!!


zig_man
8/7/2005 12:00:00 AM
i think my noobish question is simple...
I found this cool custom xml menu online at
http://www.sephiroth.it/tutorials/flashPHP/custom_tree/page003.php, and i was
hoping to use something like it on my HTML webpage, but im not quite sure how
to make it so that when i click a sub-item, it will take me to a new HTML page.
Any suggestions?
NSurveyor
8/8/2005 12:00:00 AM
For the data property of each sub-item, have the url to the new HTML page.
Then, try this for the change event:

/* a node in the tree has been selected */
treeListener.change = function (evt:Object) {
var node = evt.target.selectedItem;
var is_open = evt.target.getIsOpen (node);
var is_branch = evt.target.getIsBranch (node);
var node_to_close = node.getBrotherChilds (this.target);
// close the opened node first
if (this.target.getIsOpen (node_to_close) and this.target.getIsBranch
(node_to_close)) {
this.target.setIsOpen (node_to_close, false, true, true);
this.open_next = node;
} else {
if (is_branch) {
this.target.setIsOpen (node, true, true, true);
} else {
this.target.selectedNode = node;
this.target.dispatchEvent ({type:"click", target:evt.target});
getURL(this.target.selectedNode.data,"_self");
}
this.open_next = undefined;
}
};

AddThis Social Bookmark Button