hiee guys,
am new to this forum, pls help me if u can understand my problem.
look, according to one tutorial i created a Tree component .fla which includes TreeNavMenu.as
import mx.controls.Tree;
class TreeNavMenu extends MovieClip {
var menuXML:XML;
var menuTree:Tree;
function TreeNavMenu() {
// Set up the appearance of the tree and event handlers
menuTree.setStyle("fontFamily", "_sans");
menuTree.setStyle("fontSize", 12);
// Load the menu XML
var treeNavMenu = this;
menuXML = new XML();
menuXML.ignoreWhite = true;
menuXML.load("TreeNavMenu.xml");
menuXML.onLoad = function() {
treeNavMenu.onMenuLoaded();
};
}
function change(event:Object) {
if (menuTree == event.target) {
var node = menuTree.selectedItem;
// If this is a branch, expand/collapse it
if (menuTree.getIsBranch(node)) {
menuTree.setIsOpen(node, !menuTree.getIsOpen(node), true);
}
// If this is a hyperlink, jump to it
var url = node.attributes.url;
if (url) {
getURL(url, "_top");
}
// Clear any selection
menuTree.selectedNode = null;
}
}
function onMenuLoaded() {
menuTree.dataProvider = menuXML.firstChild;
menuTree.addEventListener("change", this);
}
}
and an TreeNavMenu.xml file
<?xml version="1.0" encoding="utf-8"?>
<node>
<node label="My Bookmarks">
<node label="Macromedia Web site" url="http://www.macromedia.com" />
<node label="MXNA blog aggregator" url="http://www.markme.com/mxna" />
</node>
<node label="Google" url="http://www.google.com" />
</node>
i did created all these files according to tutorial, but i dont knw how to import that ".as " file in flash.
Please help me or guide me to a link where i can find another tutorial of Tree Component.
Thnx