Button Area On The Tree Menu
hi!!is it possible to make the button area all the line instead of only the small arrow?thnx in advanceGuilherme
Actionscript 2.0
Posted on: Sun Jul 30, 2006 6:44 pm
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[F8] Adding Next Node Button To Tree Menu
Hello. I'm building an application based on the Tree component that is populated from an XML file. I followed the example given in the flash help files with a few additions and the basic functionality is working. I'd now like to add a button that is able to skip to the next node in the tree (basically the same as would happen if you click on a node and then press the down cursor key).
Is anyone able to give me an idea of how I'd go about this, either by doing it properly with additions the the actionscript file or just by replicating a keystroke when the button is clicked?
This is my code held in an external actionscript file:
Code:
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);
}
// Get variables from XML
var Title:String = node.attributes.label;
var Desc:String = node.attributes.desc;
var url:String = node.attributes.url;
var jpegURL:String = node.attributes.jpegURL;
var prodURL:String = node.attributes.prodURL;
var pdfURL:String = node.attributes.pdfURL;
var category:String = node.attributes.category;
trace(Desc);
trace(url);
trace(jpegURL);
trace(prodURL);
trace(pdfURL);
_parent.Title.text = Title;
_parent.Desc.text = Desc;
_parent.prodURL.text = prodURL;
_parent.jpegURL.text = jpegURL;
_parent.pdfURL.text = pdfURL; }
}
function onMenuLoaded() {
menuTree.dataProvider = menuXML.firstChild;
menuTree.addEventListener("change", this);
}
}
Any help would be appreciated, Peter.
Hit Area For A Drop Down Menu Button
Hey folks
I have a button called "main" that when is pressed causes a menu consisting of three buttons ie "button1" , "button2" "button3"
to drop down (using masking)
and when the mouse rolls out of "main" ,
the menu goes back up
The problem is the when I press "main" and the menu appears , it goes back up as soon as i try to click or even move the cursor to any of the three buttons
(i.e button1 or button2 or button3 ) due to the fact that the mouse rolls out of "main"
I even inserted a hit area in the button "main"
that covers the area where the menu would be when dropped down but the problems persists even then
What should I do ?
Anakin
How Do I Make A Tree Menu? Like The Explorer Tree?
I am currently writing a tree menu in flash that will look nearly identically to the std tree widget in windows (like explorer).
my problem is.. how do i link an object to an mc?
ie i have made a node class with member variables and methods (an array of child nodes and the LoadChildren method) and i have an mc that i want to be duplicated for each node (a little folder icon thingy).
when a node loads its children via xml it will get the data then create an array of child node objects:
for each child in xml
{
var node = new node("name from xml", "data from xml");
children.push(node);
}
so at the end of this i have a nice array of child nodes.
I dont know if i put the code that defines the node class into the folder thingy mc and then duplicate that or what..
Has anyone seen an example of something like this anywhere.. i saw a cool tree ages ago but i cant find it now..
I know its a bad explanation but my brain hurts at the moment
thanks for any help =]
Rephrased Title: HELP, PLEASE-button 'down' Then 'up' In Drop Menu Link Area
I'm sorry for repeating the post, I just thought that the title might have confused everyone!
Hi,
The drop down menu I'm referring to is located in the main movie. The menu is a movie clip with the buttons inside and I have each button as 'track as menu item' in the properties. The buttons are linked to external swfs that load into an empty movie clip on the main stage. Everything loads perfectly no problem. The problem is that I can't seem to figure out the right code to put on the sub-menu items/buttons in the drop down menu to show the 'down' state when the corresponding movie is loaded (i.e., about-main button, philosophy [menu item], philosophy movie loaded). Then get it to go back to the 'up' state when another button is pressed in the same drop area part of the menu? I hope I explained myself clear enough without confusing anyone!
I would appreciate any help - I think I'm going to lose my mind - this is driving me crazy!!
Thanks - Alleen
2004 Tree Component Node Hit Area
Does anyone know how to make the hit area on the tree component the whole row instead of the clicking on the node? I've been at this for 3 days and can't figure it out. Thanks in advance.
Tree Menu?
how do I creat the left menu like on http://www.spoono.com ?
I found this tutorial on www.virtual-fx.net but it is not quite the same.
how do I adjust the tutorial so it will be the same as spoono's one?
I mean the sliding effect and when lets say you push the tutorial button and then you push the desktop button, first the tutorial button comes up and only then the desktop button comes down.
hope you got it
Tree Menu
hi there,
can someone please tell me how i can change the labels (eg. object 1) of the buttons in the following .fla ...
http://www.flashkit.com/movies/Inter...71/index.shtml
thank you so much in advance
Tree Menu Help
I want to build a tree menu in flashMX.
This is how far I have come:
//init state for minus button
mappe.minusbutton._visible = false;
mappeinitY = 35;
//
for (i=0;i<5;i++) {
mappe.duplicateMovieClip("mappe"+i,i);
with (_root["mappe"+i]) {
_y = mappeinitY + (mappe._height + 5) * i;
_x -= (mappe._width - 12.5);
minusbutton._visible = false;
}
}
Now, the problem is that I somehow have to tell the right folders to drop down when the folder above is being pressed.
Thanks for any help!
Menu Tree
I'm looking for a tutorial on a menu tree if anyone knows of one please let me know.
Thanks
Betsy
Menu Tree
Hey guys i have been playing around with flash since flash 4 but am self taught by trial and error. I have errored so many times now that my head hurts from beating it on the monitor. I need someone to actually show me a tutorial for how to make a true menu tree. NOT SELL ME something. I have gotten very close but it doesn’t disappear when I mouse out on the button. Please any help you can give is much appreciated. An example of what I’m looking for is the menu bar at http://www.santaanita.comor like http://www.macromedia.com/ thanks
MM Tree Menu
Hello
I am trying to figure out how to either use the
Macromedia tree extension
http://www.macromedia.com/software/flash/
or build something similar.
Can anyone help me?
Thanks in advance
Quote:
*sparking the world*
Help With Tree Menu
Hi,
I'm in the middle of creating a tree menu that needs to expand/collapse when items are selected. I'm drawing all my info from a DB via sendAndLoad.
I'm having alot of problems getting the "math" right for the menu tho. If you look at the attached movies (play main.swf, which loads 1.swf) and click on Villas, you'll see what I mean. I need to have each of these items expand/collapse when they are clicked on. There will never be more then one layer under each main country, so it only has to do the expand/collapse when clicking a country.
As you'll see it's certainly not working properly as is. I wouldn't normally ask for something this large, but I was wondering if someone could take a look at my source and point me in the right direction as to how what logic I should be using. I just can't get my head around the math and logic involved to do this task.
Any help is much appreicated.
Tree Menu
I have checked out several tree menus on the web but can´t find what I´m looking for.
All the tree menus I have seen use xml and let you link to a url when pressing a menu item whereas I want to load a swf into an mc.
any suggestions would be great
thx
Xml Tree Menu
Hi
i have one assignment in my project. In that i want to create a xml tree menu like
- MainChapter
- SubDivision 1
- SubDivision 1
- Chapter 1
- screens
the above format we have used it but i try lot of samples but i cant make it easy and also navigate through this like (Next and previous)
if any experts know this please help as soon as possible
thanks in advance
Tree Menu?
I'm working on a personal project, which you can preview the beta at:
http://www.hivoltmedia.com/temp/
(Actually this is what's holding up my site from being put up online, dammit!)
This application is (or will be) a combination of a small message board, where people can leave their thoughts on the subject of humanity.
I was wondering if anyone knows of a tree menu code out there. I'm trying to accomplish the following:
Upon clicking on each human, another line will be drawn to another attached
"human" and that will have another message included. The picture of what I mean is at http://www.hivoltmedia.com/temp/diagram.gif
I would have to move the original "humans" out of the view as the tree expands to always display additional messages. I was wondering if there is some sort of a tree menu available that I could use as a starting point, or any menu that is similar to displaying the drill-down information.
Thanks,
Art
Menu Tree
how will i make my menu tree acessible to scree readers.
I have used a data grid. and i have made it accessible by writing the following code:
import mx.accessibility.DataGridAccImpl;
DataGridAccImpl.enableAccessibility();
but to make tree component accessible what should i write? (i am using flash 8 proffessional)
Menu Tree
All-
Anyone know of a menu tree (windows style) component or code that I could
buy that would be compatible with Flash 6? It probably cannot be a
component (at least a V2 component) but probably would have to be
hand-coded.
Any insights or help greatly appreciated.
-Marc Lee
Help With Tree Menu
Hi,
I'm in the middle of creating a tree menu that needs to expand/collapse when items are selected. I'm drawing all my info from a DB via sendAndLoad.
I'm having alot of problems getting the "math" right for the menu tho. If you look at the attached movies (play main.swf, which loads 1.swf) and click on Villas, you'll see what I mean. I need to have each of these items expand/collapse when they are clicked on. There will never be more then one layer under each main country, so it only has to do the expand/collapse when clicking a country.
As you'll see it's certainly not working properly as is. I wouldn't normally ask for something this large, but I was wondering if someone could take a look at my source and point me in the right direction as to how what logic I should be using. I just can't get my head around the math and logic involved to do this task.
Any help is much appreicated.
Tree Menu
I have checked out several tree menus on the web but can´t find what I´m looking for.
All the tree menus I have seen use xml and let you link to a url when pressing a menu item whereas I want to load a swf into an mc.
any suggestions would be great
thx
XML Tree Menu Help
guys, I found this tutorial on the web for a Tree Menu powered by XML. It works fine except I cannot get it to link to anything. I have attached the file with source, and xml just like I downloaded it. Can anyone help me? Thanks
Tutorial Location:http://www.sephiroth.it/tutorials/fl...tree/index.php
PS
I am just trying to get it to load an external .swf into my main movie. I can't even get it to link to an external site so something is missing or worng.
Thanks
File is too large to upload: Here is the source:
It has an XML connection node.
// Source begins here:
//Frame 1 (Prototypes)
/**
* Verify if the current XMLNODE is a child node
* of the passed node
*/
XMLNode.prototype.isChildNodeOf = function (targetParent:XMLNode) {
var ret:Boolean = false;
var myParent:XMLNode = this;
while (myParent.parentNode != undefined) {
if (myParent == targetParent) {
ret = true;
break;
}
myParent = myParent.parentNode;
}
return ret;
};
/**
* Return a list of sibling nodes of the parent node
*/
XMLNode.prototype.getBrotherChilds = function (cTree:mx.controls.Tree) {
var parent = this.parentNode;
for (var a = 0; a < parent.childNodes.length; a++) {
if (parent.childNodes[a] != this and cTree.getIsOpen (parent.childNodes[a])) {
return parent.childNodes[a];
}
}
return undefined;
};
// Second set of code on another layer Frame 1
var treeListener:Object = new Object ();
treeListener.target = tree;
treeListener.opened = undefined;
treeListener.open_next = undefined;
/* 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});
}
this.open_next = undefined;
}
};
treeListener.closeNode = function (node:XMLNode) {
for (var a in node.childNodes) {
if (this.target.getIsOpen (node.childNodes[a])) {
this.closeNode (node.childNodes[a]);
}
}
this.target.setIsOpen (node, false, false);
};
treeListener.nodeClose = function (evt:Object) {
this.closeNode (evt.node);
if (this.open_next != undefined and evt.target.getIsBranch (this.open_next)) {
evt.target.setIsOpen (this.open_next, true, true, true);
} else {
evt.target.selectedNode = this.open_next;
this.target.dispatchEvent ({type:"click", target:evt.target});
this.open_next = undefined;
}
};
treeListener.nodeOpen = function (evt:Object) {
evt.target.selectedNode = evt.node;
};
// set out listeners for the menu
tree.addEventListener ('change', treeListener);
tree.addEventListener ('nodeClose', treeListener);
tree.addEventListener ('nodeOpen', treeListener);
// third set of code on another layer Frame 1 (Styles)
// get the menu XML
this.xml_conn.trigger();
// customize tree styles
this.tree.setStyle("fontFamily", this.test_text.getTextFormat().font);
this.tree.setStyle("fontSize", this.test_text.getTextFormat().size)
this.tree.setStyle("embedFonts", this.test_text.embedFonts)
this.tree.setStyle("fontWeight", this.test_text.getTextFormat().bold ? "bold" : "normal")
this.tree.setStyle("depthColors", [0x003366,0x013972,0x014383,0x01498F,0x01509C,0x015 3A3])
this.tree.setStyle("backgroundColor",0xFFFFFF)
this.tree.setStyle("borderStyle", "none");
this.tree.setStyle("color",0xFFFFFF);
this.tree.setStyle("textIndent",0);
this.tree.setStyle("indentation",0);
this.tree.setStyle("rollOverColor",0xFFFFFF);
this.tree.setStyle("selectionColor", 0x666666);
this.tree.setStyle("selectionDuration",0);
this.tree.setStyle("textRollOverColor", 0x000000);
this.tree.setStyle("textSelectedColor",0x000000);
this.tree.setStyle("defaultLeafIcon", "nullicon");
this.tree.setStyle("folderOpenIcon", "nullicon");
this.tree.setStyle("folderClosedIcon", "nullicon");
this.tree.setStyle("disclosureClosedIcon", "nullicon");
this.tree.setStyle("disclosureOpenIcon", "nullicon");
this.tree.vScrollPolicy = 'off'
// set a custom cell renderer for the Tree
// See treecellrenderer.as file for details
this.tree.cellRenderer = 'customTreeRow'
// These 2 styles will be used by the
// custom cellrenderer
this.tree.setStyle("lineColor", 0x000000);
this.tree.setStyle("lineAlpha", 20);
Xml Tree Menu Help
hi all,
I need a tree menu like(menu, submenus, subsubmenus, etc...)(it is similar to that of My Computer folders).pls help how to create that menu dynamically using xml in Flash8.
+ MainDivision_1
- MainDivision_2
- SubDivision_1
- chapters_1
- Pages
- SubDivision_2
- chapters_1
- Pages
- SubDivision_3
- chapters_1
- Pages
+MainDivision_3
please help me
Help With Tree Menu
Hi,
I'm in the middle of creating a tree menu that needs to expand/collapse when items are selected. I'm drawing all my info from a DB via sendAndLoad.
I'm having alot of problems getting the "math" right for the menu tho. If you look at the attached movies (play main.swf, which loads 1.swf) and click on Villas, you'll see what I mean. I need to have each of these items expand/collapse when they are clicked on. There will never be more then one layer under each main country, so it only has to do the expand/collapse when clicking a country.
As you'll see it's certainly not working properly as is. I wouldn't normally ask for something this large, but I was wondering if someone could take a look at my source and point me in the right direction as to how what logic I should be using. I just can't get my head around the math and logic involved to do this task.
Any help is much appreicated.
Looking For Tree Menu
Hey everyone. I was going back through some old books (New Masters of Flash), and remembered that I hadn't checked out http://www.yugop.com in forever. Looks like he's building a new site.
Anyways, I remember an experiment that he had going called "Tree Menu".
You can get to it by going to http://www.yugop.com > Mono*Crafts 3.0 (2000-2002) > then clicking on the first dot.
Was wondering if anybody has worked on anything similiar or could shoot me to a link/tutorial.
Thanks all.
Tree Menu
I am trying to make a tree menu system from the fla. I got from ultrashock (Dynamic menu).
originally top menu was horizontal and there were drop down, but I changed top menu to vertical and there are now flyout buttons.
Please click the link below to see what I have and what i want.
http://www.alnoor.us/vertical.html
here is the modified fla
http://www.alnoor.us/vertical.zip
please let me know is it possible or not and if yes - how???
I am working on this problem from last two weeks but could not figure out. if not possible please say "NO", so i won't spent time on it
please help
Tree Menu?
I'm working on a personal project, which you can preview the beta at:
http://www.hivoltmedia.com/temp/
(Actually this is what's holding up my site from being put up online, dammit!)
This application is (or will be) a combination of a small message board, where people can leave their thoughts on the subject of humanity.
I was wondering if anyone knows of a tree menu code out there. I'm trying to accomplish the following:
Upon clicking on each human, another line will be drawn to another attached
"human" and that will have another message included. The picture of what I mean is at http://www.hivoltmedia.com/temp/diagram.gif
I would have to move the original "humans" out of the view as the tree expands to always display additional messages. I was wondering if there is some sort of a tree menu available that I could use as a starting point, or any menu that is similar to displaying the drill-down information.
Thanks,
Art
Tree Menu Tutorials
Could someone please point me towards a tutorial which shows how to create a tree style menu?
Thanks
Matt
Amazing Tree Menu.
http://surface.yugop.com - his tree menu (first experiment button at bottom) is fantastic. Does anyone know how this is done? - or can anyone point me in the direction of a tutorial that does something similar?.
Thanks guys
Simple Tree Menu
How do I make a simple bouncy vertical tree menu, like the one at http://www.mango.es/e/ ??
Help Tweaking My Tree Menu
I am building a mac-style tree menu that is almost complete except for one coding issue. I am using a control clip to push list items to the appropriate y coordinate when folders open and close. (only listing one contains sub folder and sub-sub content at this point)
My Problem is that I can't get the main folders to go back to their original spot if I have a sub folder open and close it's parent folder.
A little explanation of what I'm working with:
Each list item clip has a variable 'place', defining it's location in the list, (1-8). When you click on a list item, it sets the variable 'clickplace' to the number in the list you clicked. The code in the control clip tells it to move down any item in the list with a place value greater than the clickplace.
Each item has an instance name of H1, H2, H3....and submenu items are H1_1, H1_2.....
The code looks like this inside the control clip:
if (_root.tree.H1.place>_root.tree.clickplace) {
_root.tree.H1._y+=_root.tree.drop;
}
if (_root.tree.H1.H1_1.place>_root.tree.clickplace) {
_root.tree.H1.H1_1._y+=_root.tree.drop;
}
if (_root.tree.H1.H1_2.place>_root.tree.clickplace) {
_root.tree.H1.H1_2._y+=_root.tree.drop;
}
if (_root.tree.H1.H1_3.place>_root.tree.clickplace) {
_root.tree.H1.H1_3._y+=_root.tree.drop;
}
if (_root.tree.H2.place>_root.tree.clickplace) {
_root.tree.H2._y+=_root.tree.drop;
}
if (_root.tree.H3.place>_root.tree.clickplace) {
_root.tree.H3._y+=_root.tree.drop;
}
if (_root.tree.H4.place>_root.tree.clickplace) {
_root.tree.H4._y+=_root.tree.drop;
}
if (_root.tree.H5.place>_root.tree.clickplace) {
_root.tree.H5._y+=_root.tree.drop;
}
if (_root.tree.H6.place>_root.tree.clickplace) {
_root.tree.H6._y+=_root.tree.drop;
}
if (_root.tree.H7.place>_root.tree.clickplace) {
_root.tree.H7._y+=_root.tree.drop;
}
if (_root.tree.H8.place>_root.tree.clickplace) {
_root.tree.H8._y+=_root.tree.drop;
}
gotoAndStop (1);
A sample can be found here:
http://www.denisedixon.com/treeweb/tree.html
Macromedia Tree Menu
Hi all,
Does anyone know how the "macromedia tree menu" avaliable from the flash exchange can't be edited, so that when you click on a new menu item it closes the submenu that is open, ie: so that there is only one submenu open at any time??
hope someone can help.
thanks in advance
bboy
Menu Help - Folder Tree
This is kind of hard to explain...
ok, I need to make a flash file that has a button towards the top, that when clicked folds down a menu that has a directory tree in it... with plus and minus buttons to expand and collapse the menu.
when one is clicked the menu goes away, and a section loads up
sounds a lot simpiler when i have it typed out... I'm just having trouble with getting it started I guess.
I found a nice XML folder tree that I've been trying to work with, but just not sure how to make it come up and go away with a button.
any ideas or suggestions... the XML folder tree isn't something I have to have. Its just the only thing i've found so far.
This is basically going to be a "practice" online form. In the program its illustrating it has a button that folds down a menu... I can provide a screenshot of the program in action if needed.
Dynamic Tree Menu
Hi everybody! OK, I've been sweating over this for three days and I feel like I should have done it on my own, but oh well, I have to ask you guys! Basically, I dowloaded a tree menu from flash kit, but I want to make it dynamic...reading off a php file. I have that part down...the php file outputs:
&title0=value&title1=value2&field0=value etc.
Anyway, I need help in my actioscripting, this is what I have...oh, and just to let you know, the file previously had the variables set up like this:
title = new Array();
title[0] = "Start here";
title[1] = "SECTION 2";
title[2] = "SECTION 3";
title[3] = "SECTION 4";
title[4] = "SECTION 5";
n = new Array();
n[0] = 3;
n[1] = 2;
n[2] = 4;
fields = new Array();
fields[0] = "now look here";
fields[1] = "maybe here?";
fields[2] = "FIELD 3";
etc...ok, heres the code:
PHP Code:
function showMenu() {
var i = 0;
while (this["title" + "["+i+"]"] != undefined) {
trace(this["title" + "["+i+"]"]);
++i;
}
var i = 0;
while (this["fields" + "["+i+"]"] != undefined) {
trace(this["fields" + "["+i+"]"]);
++i;
}
var i = 0;
while (this["n" + "["+i+"]"] != undefined) {
trace(this["n" + "["+i+"]"]);
++i;
}
var i = 0;
while (this["links" + "["+i+"]"] != undefined) {
trace(this["links" + "["+i+"]"]);
++i;
}
}
var c = new LoadVars();
c.onLoad = showMenu;
c.sendAndLoad("testmenu4.txt", c, "POST");
stop();
goal = new Array(n.length);
goalf = new Array(fields.length);
beginning = new Array(n.length);
function goals() {
cont = 0;
for (i=0; i<n.length; i++) {
name = "object"+i;
if (i>key) {
goal[i] = (i+n[key])*16+1;
for (a=cont; a<cont+n[i]; a++) {
goalf[a] = goal[i];
}
cont = a;
} else if (i<key) {
goal[i] = beginning[i];
for (a=cont; a<cont+n[i]; a++) {
goalf[a] = goal[i];
}
cont = a;
} else if (i == key) {
goal[i] = beginning[i];
for (a=cont; a<cont+n[i]; a++) {
if (a == cont) {
before = a-1;
}
goalf[a] = 16*(a-before)+goal[i];
}
cont = a;
}
}
}
clip._visible = 0;
clip1._visible = 0;
cont = 0;
for (i=0; i<n.length; i++) {
name = "object"+i;
duplicateMovieClip(_root.clip, name, i+100);
goal[i] = i*16+1;
beginning[i] = i*16+1;
_root[name].key = i;
_root[name]._y = i*16+1;
_root[name].title = title[i]; //<--this i where I think I need to make it read off the txt file, but can't come up with the right syntax
for (a=cont; a<cont+n[i]; a++) {
name1 = "newobject"+a;
duplicateMovieClip(_root.clip1, name1, a);
goalf[a] = i*16+1;
_root[name1].field = a;
_root[name1].link = links[a]; //<--same here
_root[name1]._y = goal[i];
_root[name1].title = fields[a]; //<--and here?
}
cont = a;
}
function end() {
cont = 0;
for (i=0; i<n.length; i++) {
name = "object"+i;
_root[name].gotoAndStop(1);
}
end1();
}
function end1() {
for (i=0; i<fields.length; i++) {
name = "newobject"+i;
_root[name].gotoAndStop(1);
}
}
function close() {
cont = 0;
for (i=0; i<n.length; i++) {
name = "object"+i;
_root[name].gotoAndStop(1);
goal[i] = beginning[i];
for (a=cont; a<cont+n[i]; a++) {
goalf[a] = goal[i];
name1 = "newobject"+a;
_root[name1].gotoAndStop(1);
}
cont = a;
}
}
{
Hopefully you guys get what I'm asking, let me know if I can further explain myself...also, I'm using flash MX. Thanks!!
Easy Tree Menu
I need to make a fairly complex (3-4 levels deep) tree menu in Flash...
Whats going to be the quickest way in Flash?
Regards,
James
Yugop Tree Menu
Does anyone know how the Yugop.com tree menu was created? Mono*Crafts 3.0 http://yugop.com/ver3/index.asp?id=1
I have to believe that it was created with ActionScript but I don't know if anything else was used. Does anyone know where I might find similar examples or anything to recreate a similar menu system? I've tried to contact him directly - to no avail.
//C
XML Menu Tree Navigation
I'm using the menu XML tree navigation component by Luca Tosti. I'm trying to modify it so that when you open a single branch, any other branches will close.
My thought was to assign a global temp variable to equal the current menu choice and on the second turn, it will call the "close" function for the temp variable. What happens is the previous menu closes, but it disappears altogether.
Here's a link to the component I edited.
http://d430214.u34.webhostmetro.com/test/menu.htm
The left one is the original and the one on the right is the modified. Also the code is underneath it. The bolded code is the code I added.
any thoughts would be greatly appreciated.
Thank You
G Paris Tree Menu Help
can anyone tell me how to add links to this drop down menu. i have tried doing it by converting each link to a symbol then button then in actions choose on release get url. i have entered my url correctly yet when i test it then it doesnt work.
i am using flash mx
Menu Tree Url Link
Hey all.
THIS SHOULD BE VERY SIMPLE
but im not a great coder !
---------------------------------
I am trying to get my modifeid Menu Tree (component) to link to an external URL or a SWF when you click on one of the expaneded (menus) nodes.
SEE ATTACHED FOR THE MENU fla:
here is the actinscript code part.-------------------------------------------
var treeListener:Object = new Object ();
treeListener.target = tree;
treeListener.opened = undefined;
treeListener.open_next = undefined;
/* 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});
}
this.open_next = undefined;
}
};
treeListener.closeNode = function (node:XMLNode) {
for (var a in node.childNodes) {
if (this.target.getIsOpen (node.childNodes[a])) {
this.closeNode (node.childNodes[a]);
}
}
this.target.setIsOpen (node, false, false);
};
treeListener.nodeClose = function (evt:Object) {
this.closeNode (evt.node);
if (this.open_next != undefined and evt.target.getIsBranch (this.open_next)) {
evt.target.setIsOpen (this.open_next, true, true, true);
} else {
evt.target.selectedNode = this.open_next;
this.target.dispatchEvent ({type:"click", target:evt.target});
this.open_next = undefined;
}
};
treeListener.nodeOpen = function (evt:Object) {
evt.target.selectedNode = evt.node;
};
// set out listeners for the menu
tree.addEventListener ('change', treeListener);
tree.addEventListener ('nodeClose', treeListener);
tree.addEventListener ('nodeOpen', treeListener);
---------------------------------------------------------
here is the XML part :
---------------------------------------------------------
<node label="» NÚCLEO 1" value="2">
<node label="» GOVERNO">
<node label="Google"/>
<node label="Papai Noel no Maracanã"/>
<node label="Compra Rio" />
<node label="Expo Abbras" />
<node label="Detran RJ" />
</node>
</node>
<node label="» NÚCLEO 2">
<node label="» ABRIL" >
<node label="Playboy 30 Anos"/>
<node label="Luma de Oliveira" />
<node label="6&7 Prémio Contigo" />
<node label="Fashion Rio Stilo" />
<node label="Veja Rio ultimo" />
</node>
<node label="» Petrobras" >
<node label="33 anos" />
<node label="QSMQ" />
</node>
</node>
<node label="» PROGRAMMING">
<node label="» ACTIONSCRIPT">
<node label="» TUTORIALS">
<node label="Using the Data Binding Classes" />
<node label="Build A PhotoGallery" />
<node label="Customize DataGrid" />
</node>
<node label="» LIVEDOCS">
<node label="Customizing the DataGrid" />
<node label="PopUpManager.createPopUp()" />
<node label="Using Components" />
<node label="LiveDocs HomePage" />
</node>
<node label="Flash MX 2004" />
</node>
<node label="» PYTHON">
<node label="» WXPYTHON">
<node label="» WIKI">
<node label="wx.ToolBar" />
<node label="wx.App" />
<node label="Customize wx.STC" />
</node>
<node label="» ARTICLES">
<node label="» SCINTILLA">
<node label="Scintilla.org" />
<node label="Scintilla Docs" />
</node>
<node label="Python COM+" />
<node label="py2exe examples" />
<node label="py2app - MAC-OSX" />
</node>
</node>
<node label="http://www.python.org home" />
<node label="Jython python for java" />
</node>
</node>
-------------------------------------------------------------------------
Tree Menu Expands Up
Hi,
I have been told that if I want to use a tree menu then xml is the best way. However I need the tree to expand up rather than down. I have never used xml so was wondering if anyone can offer me any advice on the best way to tackle this.
Flash Tree Menu
Hi Guys,
Ok, I have a flash tree menu and I need to make a couple of changes to it, but for the life of me can't figure out how.
Below is the code for the tree ... All I need is to somehow be able to do the following:
1: Add a divider in between the menu options ... Just a simple line to break up the menu items.
2: Menu control ... I need an open section to close when I click another section.
3: The easing .... I have it easing the menu down, but for the life of me can get it to ease back up when another section is clicked.
I'm sure this would be a breeze for anyone who is clued up, so if you can help that would be great ..... I have searched around, for way longer than I had imagined, but still no luck .... Appreciate the help.
Here's the code:
PHP Code:
var my_tree:mx.controls.Tree;
var my_ta:mx.controls.TextArea;
var treeDP_xml:XML = new XML();
treeDP_xml.ignoreWhite = true;
treeDP_xml.onLoad = function(success:Boolean) {
if (success) {
my_tree.dataProvider = this.firstChild;
}
};
treeDP_xml.load("menu.xml");
var treeListener:Object = new Object();
treeListener.change = function(evt:Object) {
var treeNode:XMLNode = evt.target.selectedItem;
if (treeNode.attributes.src != undefined) {
trace(treeNode.attributes.src)
loadContent(treeNode.attributes.src);
}
};
my_tree.addEventListener("change", treeListener);
function loadContent(file){
_xml = new XML();
_xml.ignoreWhite = true;
_xml.load(file);
_xml.onLoad = function(){
image = this.firstChild.attributes.img; trace(image);
txt = this.firstChild.attributes.txt; trace(txt);
cloader.my_ldr.load(image);
my_ta.text = txt;
};
};
my_ta.setStyle("borderStyle", "none");
//Tree Controls
my_tree.addEventListener("change", treeListener);
var lo = new Object();
lo.change = function (event_obj)
{
var tree = event_obj.target;
var sel_tn = tree.selectedNode;
if (tree.getIsBranch(sel_tn))
{
var nodeAlreadyOpen_bool = tree.getIsOpen(sel_tn);
tree.setIsOpen(sel_tn,!nodeAlreadyOpen_bool);
}
}
my_tree.addEventListener('change',lo);
//Sliding
my_tree.setStyle("Easing", transitions.easing.Back.easeOut);
// add eventHandler to your listener
my_tree.addEventListener("change", my_treeListener);
//Tree Styles
my_tree.setStyle("alternatingRowColors", [0xffffff, 0xF5F8FA]);
my_tree.setStyle("fontFamily", "Verdana");
//this.my_tree.setStyle("embedFonts", true);
my_tree.setStyle("fontSize", 11);
my_tree.setStyle("fontWeight", "bold");
my_tree.setStyle("depthColors", [0x175188,0x4175a7,0x1b72c6,0x1b72c6,0x01509C,0x6497c8])
my_tree.setStyle("backgroundColor", 0x175188);
my_tree.setStyle("borderStyle", "none");
my_tree.setStyle("borderColor", 0xFFFFFF);
my_tree.setStyle("color",0xFFFFFF);
my_tree.setStyle("textIndent",4);
my_tree.setStyle("indentation",0);
my_tree.setStyle("rollOverColor",0x1b72c6);
my_tree.setStyle("selectionColor", 0x6c8bca);
my_tree.setStyle("buttonColor", "0xFFFFFF");
my_tree.setStyle("selectionDuration",0);
my_tree.setStyle("textRollOverColor", 0xfdf27c);
my_tree.setStyle("textSelectedColor",0x000000);
my_tree.setStyle("defaultLeafIcon", this.plane);
my_tree.setStyle("folderOpenIcon", this.plane);
my_tree.setStyle("folderClosedIcon", this.plane);
my_tree.setStyle("disclosureClosedIcon", this.plane);
my_tree.setStyle("disclosureOpenIcon", this.plane);
//create a new listener to catch click on tree node
my_treeListener = new Object();
// change event handler
my_treeListener.change = function(eventObject)
{
// the selected node
var theSelectedNode = eventObject.target.selectedNode;
//if it's a branch (a folder) so the branch is open
if(my_tree.getIsBranch(theSelectedNode)){
//Note: remove the last boolean optionnal parameter if you won't have an animated transition
my_tree.setIsOpen (theSelectedNode, true,true,true);
}
}
// add eventHandler to your listener
my_tree.addEventListener("change", my_treeListener);
*edit, changed your quote tags to php tags, as suggested in this forum's guidelines.
gparis
Easy Tree Menu
Hi,
Im looking to build a tree menu in Flash MX - and am looking for the easiest way to do it.
I need the menu items to jump to frames or perhaps run actionscript.
Regards,
James
Tree Menu System
ok here is my script, i want to do to a tree submenu system
is b2 is selected display tree submenu and the over animation stay there.
b2 is the only button with tree submenu links.
the b2 tree animation is in the frame 2 of the timeline and the stop is the frame 20.
i dont know that is the better solution. maybe a dinamic tree should be help.
thank a lot guys.
Code:
stop();
//
var btnArray:Array = new Array(b0, b1, b2, b3);
var numBtns:Number = btnArray.length;
var selectedBtn:MovieClip = undefined;
//
function setUpButtons():Void {
for (var i = 0; i < numBtns; i++) {
var myBtn:MovieClip = btnArray[i];
myBtn.selected = false;
myBtn.onRollOver = function() {
this.anim_mc.onEnterFrame = function() {
this._currentframe == this._totalframes ? delete this.onEnterFrame : this.nextFrame();
};
};
myBtn.onRollOut = b0.onDragOut = function () {
if (selectedBtn != this) {
this.anim_mc.onEnterFrame = function() {
this._currentframe == 1 ? delete this.onEnterFrame : this.prevFrame();
};
}
};
myBtn.onRelease = function() {
if (selectedBtn != this) {
selectedBtn.anim_mc.onEnterFrame = function() {
this._currentframe == 1 ? delete this.onEnterFrame : this.prevFrame();
};
selectedBtn = this;
this.anim_mc.gotoAndStop(this.anim_mc._totalframes);
gotoAndPlay(20);
}
if (selectedBtn = b2){
gotoAndPlay(2);
}else {
if (selectedBtn != b2)
gotoAndPlay(1);
};
};
}
}
setUpButtons();
XML Yugop Tree Menu. How?
I was looking all over the web for any similar XML driven floating tree-expandable navigation like Yugop... anyway I come across this entry
http://www.after-hours.org/blog/arch.../16/menu_tree/
Extract everything from zip and publish.. but it could not work...
Help~~~!
edit: here's another good dynamic flowchart,
http://www.friendsofed.com/samples/1590591585.pdf and the source is available in their download section.
Right Align Tree Menu
Hi All,
I am working on a Arabic Project which requires the Tree Menu to be aligned from right to left.
Is there any way that I can get it done . Please help this is very urgent.
Menu Tree Navigation
I am using FlashMX.
Iam working on a windows Explorer style nav tree. You can click on a top level item, and it expands down to view the subitems. Everything is in order, except:
If a user opens one top level node, then opens another, i want the first node to close automatically.
How do I do this? I would be happy to send the files for y'all to see...
Make sense? Please help!
Custom Tree Menu
I want to make a custom tree menu and I want that menu to have different functions for every button (some to change xml files, some to load swf files, some to open urls) ...the problem is that i have no idea on how to start this or how this have to work, I think the tree component is not such a great idea for this work....
Any suggestions or is there any one that have a tree menu like this from an old project or something like this? :D
Thanks
Paul
Big Big Problem With Tree Menu
I want to make the tree component to close when I click on another tree node....
I want to make it just like this menu but with the code form gotoandLearn tree tutorial :)
Is there anyone that can help me to combine those two tutorials together? :)
|