Hello, basically let me explain what the heck i want it to do. I NEED a tree navigation on the left side of the screen, and when i select a heading on the tree i need it to load a corosponding SWF into a movieclip holder on the right side of the screen. Not only that, but i need the menu item on the tree to stay highlighted (as to show where you are) i have been trying to do this for 2 days using the component and every other method i can imagine…the nearest i got was managing to get an swf on a specific level (such as 2) but pointing it to a mc_holder proves futile, and i dont even know how to go about keeping the tree menu item highlighted…
I manage to get flash to pull up a swf using the following code, its crude, but it works. unfortunatly it loads it to 0,0 and simply will not load to anything except a layer
eg.
if (url) {
loadMovie(url, "mc_holder");
produces the swf being loaded in a new IE window.
Im referencing this XML code
<node>
<node label="Test">
<node label="Test SWF load" url="HomeTube.swf" />
</node>
</node>
And this is my .as file for the Tree
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) {
loadMovienum(url, "mc");
}
// Clear any selection
menuTree.selectedNode = null;
}
}
function onMenuLoaded() {
menuTree.dataProvider = menuXML.firstChild;
menuTree.addEventListener("change", this);
}
}
hmm…anyone have any ideas. i mean…i hope to have 30+ menu items all which call a different SWF to the holder. and then after that, figure out how to make the menu item stay highlighted until you select another item.
cheers.
][od