Tree Component And Regular Button
Hi,
I am not sure if I am on the right forum but anyway, I was wondering if it is possible to use the tree component and a next button. Here is the scenario, I want to be able to use the tree component to load movies on to an empty clip, at the same time I will have a next and back buttons that when clicked will load the next movie under the hierarchy of the tree menu, with this the tree menu also changes such as the background of the link that is active also changes. Can the tree component be controlled externally with a button or thru the timeline.
Thanks.
Al
Ultrashock Forums > Flash > Flash Newbie
Posted on: 2006-11-10
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Tree Component And Regular Button
Hi,
I am not sure if I am on the right forum but anyway, I was wondering if it is possible to use the tree component and a next button. Here is the scenario, I want to be able to use the tree component to load movies on to an empty clip, at the same time I will have a next and back buttons that when clicked will load the next movie under the hierarchy of the tree menu, with this the tree menu also changes such as the background of the link that is active also changes. Can the tree component be controlled externally with a button or thru the timeline.
Thanks.
Al
Regular Expression + <a Href> + TextArea Component
I'm using Regular expressions and <a> tag in my code to convert hyperlink input by the user (in TextArea component) displayed as that in another TextArea component.
My code is..
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function show():void
{
var str:String = "";
str = addHyperlink(inp.text);
if (out.htmlText == "") out.htmlText = str;
else out.htmlText += str;
}
public function addHyperlink(inputStr:String):String
{
var regExp1:RegExp = new RegExp("(^|\s+)((https?|ftp|news|)\:\/\/[^\s]*[^.,;''>\s\)\]])" , "gi");
if (regExp1.test(inputStr))
inputStr = inputStr.replace(regExp1 , "<a href='$2'> $2</a>");
return inputStr;
}
]]>
</mx:Script>
<mx:TextArea id="out" x="146" y="31" width="215" height="58" />
<mx:TextArea id="inp" x="146" y="119" width="215" height="56"/>
<mx:Button x="224" y="199" label="click" click="show()"/>
<mx:Label x="35" y="53" text="See OutPut Here"/>
<mx:Label x="35" y="145" text="Input Text Here"/>
</mx:Application>
1).
Give input in the lower TextARea as
hiii http://yahoo.com
I am sorry - "hiii http://yahoo.com" is not valid selection. Please try any one of following.
Button
TextARea
TextInput
Chart
HTML
2).
Now Click the button named "click" to see the output.
3). delete text in the input box and type any text here. Say, you type "hi".
You will see that a lot of text will disappear from output box. while debugging I found that its due to using $2 while replacing string.
Does anyone know a workaround?
Thanks in advance :-)
Shubhra
Regular Expression + <a Href> + TextArea Component
I'm using Regular expressions and <a> tag in my code to convert hyperlink input by the user (in TextArea component) displayed as that in another TextArea component.
My code is..
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function show():void
{
var str:String = "";
str = addHyperlink(inp.text);
if (out.htmlText == "") out.htmlText = str;
else out.htmlText += str;
}
public function addHyperlink(inputStr:String):String
{
var regExp1:RegExp = new RegExp("(^|\s+)((https?|ftp|news|)\:\/\/[^\s]*[^.,;''>\s\)\]])" , "gi");
if (regExp1.test(inputStr))
inputStr = inputStr.replace(regExp1 , "<a href='$2'> $2</a>");
return inputStr;
}
]]>
</mx:Script>
<mx:TextArea id="out" x="146" y="31" width="215" height="58" />
<mx:TextArea id="inp" x="146" y="119" width="215" height="56"/>
<mx:Button x="224" y="199" label="click" click="show()"/>
<mx:Label x="35" y="53" text="See OutPut Here"/>
<mx:Label x="35" y="145" text="Input Text Here"/>
</mx:Application>
1).
Give input in the lower TextARea as
hiii http://yahoo.com
I am sorry - "hiii http://yahoo.com" is not valid selection. Please try any one of following.
Button
TextARea
TextInput
Chart
HTML
2).
Now Click the button named "click" to see the output.
3). delete text in the input box and type any text here. Say, you type "hi".
You will see that a lot of text will disappear from output box. while debugging I found that its due to using $2 while replacing string.
Does anyone know a workaround?
Thanks in advance :-)
Expend All Folders In Tree (tree Component (Flash MX 2004/Flash 8))
Hello all,
I have a tree component witch reads an XML file. Now On my tree I got folders and subfolder. I want by a press of a button, to be able to expend all the folders of my tree. How do you do this?
Tree format: (view attachment)
Tree XML file:
PHP Code:
<node label="Project 1">
<node data="data1" label="Item1" />
<node data="data2" label="Item2" />
<node data="folder1" label="Folder">
<node data="data3" label="Item 1 in folder" />
<node data="data4" label="Item 2 in folder" />
<node data="folder2" label="Folder in folder">
<node data="data5" label="Hello!" />
</node>
</node>
</node>
Any ideas, paths? Please!
Thank you A LOT in advance!
How Do I Make A Regular Button With Url?
I made my button and want to add my url to it. I know I have to go to "get url" then type window, then something... Can some one help me out here. I have flash mx2004. On the old flash, it's so much easier. Thanks in advance.
How Do I Make A Regular Button With Url?
I made my button and want to add my url to it. I know I have to go to "get url" then type window, then something... Can some one help me out here. I have flash mx2004. On the old flash, it's so much easier. Thanks in advance.
[F8] Tree Component Within Accordian Component
Hello all!
I've done a navigation scheme that uses both the accordion and tree components. The data being gathered is from an XML file. The only problem i'm having is getting the tree components to display the data that they're being provided with. I did traces and I found out that they are getting the data...but it simply isn't being displayed. Can anyone take a look at the FLA and see what's going wrong?
http://www.jake3p0.com/downloads/accordionTreeNav.zip
Tree Component - Please Help
Please help anyone. I have a tree that is populated by "loading" and xml file that is produced by a CFDirectory call. When I click on one of the folders in the displayed tree, I then call the CF file again with the full path for that file resulting in the XML for that folder being sent back to me.
All of this works up to that point, however, I cannot get the new XML to be inserted into the proper place in my tree. For instance, lets say the root folder is called "Mail". When I click on it, I want the subfolders, "InBox, Sent, and Trash" added as child nodes of the Mail folder.
Also, I cannot figure out how to delete a child node, not a root node, from a branch. Using the example above, lets say I just want to delete the "Sent" node completly. How do I do this?
Thanks in advance for any and all help.
CFDaddy
Tree Component
Does anyone know if it is possible to have the text in a row of a tree menu wrap around and display below instead of going off to the side?
Fle Tree Component
Hi everyone,
I'm building an application that uploads picture files on the server... I was woundering if there are tree components that can read the contents of the local machine (rather than XML files) in order to browse to the file select for the ftp upload... I can do it with java or ASP but I think it would be nice to do it with flash... Any thoughts, hints and links will be greatly appreciated...
Thanks,
peter
XML And Tree Component
hi.
first of all: i'm not a native english speaker ...so please forgive my spelling errors
i am using a tree component that loads an xml file. it loads fine, all ok.
the problem is when the xml file has more nodes with the same name.
i'll give a practical example:
3 nodes each one with a son. let's say node1, node2, node3 and son1, son2 and son3.
the problemm: node1 and node3 have the same name, son1 and son3 have different values.
at this point the tree component creates 3 nodes
is there any way of preventing that? any flash predefined function? or i have to write my own as to check for that?
i'm using flash mx 2004 professional and a working example of this can be seen on my homepage
thanks for help,
sia
Tree Component (yes Again)
Im sure this has been asked before...but I tried to search for tree component and it didnt result in any noobie threads.
I have NEVER used the tree component before... and am looking for al ittle hand holding on setting up my first one...
but ore specifically I would like to get some links to good tuts or MM links to how to use it in its most BASIC formm even...
Thanks..
Tree Component
I have been following this tutorial on creating a tree component in Flash, however for the life of me I cannot figure out how to do a onclick command.
What I am wanting to do is when you click on one of the menu items it will load a particular frame without loosing the menu.
Does anyone have any suggestions on how I might be able to get this to work.
Here is the link to the one I have been trying out. LINK
Tree Component & The XML Is Can Use..
ok..I have a tree component on my stage (theTree)
the code:
Code:
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(){
theTree.dataProvider = this.firstChild;
}
//myXML.load("date.xml");
//myXML.load("prod2.xml");
myXML.load("products.xml");
var treeObj:Object = new Object();
treeObj.change = function() {
//
var itemSelected = theTree.selectedItem;
trace("Item selected: "+itemSelected);
}
theTree.addEventListener("change", treeObj);
you can NOT use the VALUES of any XML nodes for anything?..can this be correct? (I surely hope not)... also..the only way to populate the tree is by using attribute tags in the XML doc?
here is some sample XML files.. and the results:
products.xml
PHP Code:
<products>
<product>
<image>image1.jpg</image>
<name>PiraTe 1</name>
<price>1.99</price>
<size>
<choice>X-SMALL 1</choice>
<choice>SMALL 1</choice>
<choice>MEDIUM 1</choice>
<choice>LARGE 1</choice>
</size>
<color>
<choice>GREEN 1</choice>
<choice>BLACK 1</choice>
<choice>GREY 1</choice>
<choice>RED 1</choice>
</color>
<description>etc..etc..etc.</description>
<link>javascript:NewWindow=window.open('image1.jpg','Product_Details','width=85,height=100,left=100,top=100,screenX=100,screenY=100');NewWindow.focus();void(0);</link>
<quantity>
<choice>1</choice>
<choice>2</choice>
<choice>3</choice>
<choice>4</choice>
<choice>5</choice>
</quantity>
</product>
<product>
<image>image2.jpg</image>
<name>X-Bones 2</name>
<price>9.99</price>
<size>
<choice>X-SMALL 1</choice>
<choice>SMALL 1</choice>
<choice>MEDIUM 1</choice>
<choice>LARGE 1</choice>
</size>
<color>
<choice>GREEN 1</choice>
<choice>BLACK 1</choice>
<choice>GREY 1</choice>
<choice>RED 1</choice>
</color>
<description>etc..etc..etc.</description>
<link>javascript:NewWindow=window.open('image2.jpg','Product_Details','width=85,height=100,left=100,top=100,screenX=100,screenY=100');NewWindow.focus();void(0);</link>
<quantity>
<choice>1</choice>
<choice>2</choice>
<choice>3</choice>
<choice>4</choice>
<choice>5</choice>
</quantity>
</product>
</products>
I only get [functiomType],[functiomType],[functiomType]..etc as a result in the tree.
date.xml
PHP Code:
<tree>
<date label="date">
<month label="month" traceId="ok">Jan.</month>
<day label="day" traceId="ok">27</day>
<year label="year" traceId="ok">2006</year>
</date>
</tree>
the folders get names assigned to them..however the sub folders..when you open the..same thing..[functionType]...etc.. if you have ANY value between a node element...what can you do with it?
Doesnt seem to work well with XML like this...
anybody??
Tree Component On Mac And Pc
hello,
im building an application that needs to be cross platform, mac pc
i have a tree component i'm using throughout, and it functions %100 on a mac, but i burned it on a cd and tried it on a pc and it doesn't display anything
i was under the impression that tree components were universal across platforms, is there a piece of code needed for it to work on a pc?
i know its not a font issue becasue the font shows up in textarea components elsewere
any help would be greatly appreciated- doni
Tree Component
I have a tree component that I want to have the following functionality...
I want only one branch open at a time...so when the user expands the first branch it reveals all of its items inside that branch...then when the user chooses a second branch (without first closing the first branch) the first branch will collapse and only the new selected branch will have all of its items visible...I tried to store the nodes in an array, and then just close the node with array[index-1] but I cannot seem to be able to store the nodes, or even the index of the nodes in an array...are there any efficient way of doing this?
Tree Component (set 2).
Hi !
I don't know how to use the Tree Component of Macromedia Flash UI component set 2.
I tried some examples in the Help but it do not work...:-(
Can someone post me an example of a complete script that I can use ? (a script using
cool functions!!)
Thank you.
Mathieu
P.S. It's strange that there is no Flash UI Label component in Flash MX (like in Visual Basic)...
Is there such a component somewhere on the web ?
Tree Component In CS 3(AS 3.0)
Hi evry1
Can any1 pls suggest how to use a tree component in CS3 thru AS 3 only not thru AS 2...??? And i don't want to use Yahoo Astra also...
Thanks in advance!!!
Tree Component
I've made a photo galery like in flash semples "...MacromediaFlash 8Samples and TutorialsSamplesActionScriptGalleriesgallery_tree.fla". The lables of fotos are loaded to the "Tree component" from the XML file. The question is if the label of photo is too long, how to make it in multiline automatically in a tree component!
Tree Component
I've made a photo galery like in flash semples "...MacromediaFlash 8Samples and TutorialsSamplesActionScriptGalleriesgallery_tree.fla". The lables of fotos are loaded to the "Tree component" from the XML file. The question is if the label of photo is too long, how to make it in multiline automatically in a tree component!
Edited: 02/11/2007 at 10:00:48 PM by makmarkit
Tree Component
I want to make a help application for a flash application. I think the best way to do this is to use the tree component. I've been playing around with it and I've got it display the various sections of help. I want the actual help text to be read from the XML of the menu.
Problem is, because the node has a child (the help text), the menu displays the arrow and folder icons indicating it's a branch. I've got it to only open the branch and display the text if the child nodeType is not a text node, but clicking the arrow rather than the text still opens the branch. Also I don't want the icons to be set to the branch icon if its child is a text node.
I have yet to play with setting the icon, but this all seems a haphazard way of doing things when all I want to do is just set a node's property as a leaf rather than a branch regardless if it has children or not.
One last thing, is there a better way to approach this whole application?
TREE Component
Hi guys!
Is there a tutorial somewhere that I can learn how to populate a tree
component?
Thanks!
Tree Component
Are there any one out there who can help me with a problem.. I want to have the tree component om my webpage but I want it to be transparant so that you can see the background thru it. But I´ve looked every where and asked a lot of people but no one seems to know how to do it!
If you can help me maybe I can help you with something back..
Tree Component
Hi ye,
The code on my Flash tree component has:
var treeL:Object = new Object();
treeL.change = function() {
var item = theTree.selectedItem;
var earl = item.attributes.url;
if(earl) {
getURL(earl ,target=myIframe);
}
}
the xml file it reads from has eg.
<tree>
<folder label="Test">
<link label="TSample" url="one.html" />
</tree>
The myIframe target above is on the same html page as the tree component, but instead of loading the file "one.html" into
the target myIframe, it gets loaded as a separate one.html page.
The question is, how do I target an Iframe named myIframe with its layout controlled by a content id, from a Flash tree component on same html page, and get my one.html file to load into it??
The one.html file currently loads as a separate hml page.
thanks
Colm
Tree Component
How can i find the parent of an node.
What I'm trying to do is, on drag and drop not to be able to drop a node in to one of his childes.
Hope you understand
please help
tks
Edited: 02/14/2007 at 01:03:20 AM by gigisfarleaza
Tree Component
Hello,
i have Tree component with instance name fruit_tree. I addItem like this:
for (i=0; i<fruitsArr.length; i++) {
fruit_tree.addItem({label:"scene "+(i+1), data:i});
}
and want to clip button and removeAll(), but it does not work intil this all items are in node. removeAll - delete only node.
Someone know some other way to do remove it?
Attach Code
for (i=0; i<fruitsArr.length; i++) {
fruit_tree.addItem({label:"scene "+(i+1), data:i});
}
Tree Component
want that the text written at its nodes at different level are in different
font.Is it possible ?
Eg:
node1 arial font
---child1 of node1 in verdana font
---child2 of node1 in verdana font
node 2 arial font
---child1 of node2 in verdana font
---child1 of node2 in verdana font
If not possible can u tell a link or tutorial for making such a componenet
Plz help
Tree Component
How can i change the color of text on rollover/rollout, only for that item ?
tks
Why No Tree Component?
hmmm, I see a tree control/component in AS 2 but not AS 3. must have missed something. maybe there's an xml view of some kind? what I need wouldnt just show raw xml but would be a stylized, skinnable, user friendly UI component..
am I supposed to roll my own? if so, any tips on how to go about that? nesting the existing list component maybe?
thanks!
Edited: 03/23/2008 at 10:50:08 PM by ceteris
AS3 Tree Component
Hi.
I am just wondering if there is a Tree menu component for AS3 I cant find one, if not can anyone suggest an alternative?
Thanks
Barry.
Tree Component Help
hi everybody,
today i was going through the new updated help of mx2004 and in the tree class help i just couldnt digest one thing it was given as
Tree.setIcon() ------ Specifies whether a node is open or
closed.
Tree.setIsOpen() ------ Specifies a symbol to be used as an icon
for a node.
=============================================
can anybody help me with the tree component
I need to open the tree node but clicking on the name but the node opens on clicking the arrow icon beside it
Xml Tree Component
Does anybody know how to use the xml tree compenent menu?? It reads from an xml file but I do not know how to get to read or anything. If anyone knows of a good tutorial for it I would appreciate it. Let me know if you need more specifics on what I am tring to do. (it is in the Flash UI COmponents Set 2)
Use Of Tree UI Component...
Hi all,
Could anyone help me find a good start for learning the use of Tree UI component, where I can load XML on it. Like a list of populat web search engine, so when I click on it they will bring the user to the site.
Thanks.
Please help.
XML TREE COMPONENT
Does anyone know how to make the title of the tree conponent's folders to return on to 2 lines if the title is larger then the set width of the component.
Tree Component
is there a way to populate the tree with folders present on my hard disc .
eg : E:soumya .
if the user clicks on it , the files & folders inside e:soumya shud be shown automatically ........ something like the file list box in VB ????
Tree Component
http://livedocs.macromedia.com/flash...=00002881.html
Was testing this out to use as a navigational menu. I can't find anything in the documentation on how to create the links. Can anybody help?
“Tree Component”
Hi:
I’m a Kind of new in flash MX ,, so can any one help me pleas.
Where can I modify or put items in the “Tree Component” (Flash Professional 8 )
Thanks
Tree Component
I am trying to use the tree component(already populated via xml file) to load images into an empty movieclip on the stage.would anyone be kind enough to provide sample script(both xml and as) or show me a tutorial that shows how this is done.
thanks.
Tree Component And Map
Need a little help here guys. The concept seems simple but I'm having troubles. I'm building an interactive map using an XML driven Tree component as the source of the navigation. The navigation contains items like hotels, airports, gas stations, etc. I want the user to be able to select an item from the Tree and have the map zoom to that location. The map is just a vector based image within a movieclip. I'm having trouble understanding how I can get the XML Tree items to communicate with my map. I'm thinking it needs to send over x and y coordinates...kind of confused on this one. Any help would be appreciated.
Thanks!
Tree Component Help Please.
Okay so I have a tree menu component. I want to put a node into a branch without using xml please help me.
: king::huh :
Tree Component
I have a tree component that I want to have the following functionality...
I want only one branch open at a time...so when the user expands the first branch it reveals all of its items inside that branch...then when the user chooses a second branch (without first closing the first branch) the first branch will collapse and only the new selected branch will have all of its items visible...I tried to store the nodes in an array, and then just close the node with array[index-1] but I cannot seem to be able to store the nodes, or even the index of the nodes in an array...are there any efficient way of doing this?
Tree Component Help
hi everybody,
today i was going through the new updated help of mx2004 and in the tree class help i just couldnt digest one thing it was given as
Tree.setIcon() ------ Specifies whether a node is open or
closed.
Tree.setIsOpen() ------ Specifies a symbol to be used as an icon
for a node.
=============================================
can anybody help me with the tree component
I need to open the tree node but clicking on the name but the node opens on clicking the arrow icon beside it
Use Of Tree UI Component...
Hi all,
Could anyone help me find a good start for learning the use of Tree UI component, where I can load XML on it. Like a list of populat web search engine, so when I click on it they will bring the user to the site.
Thanks.
Please help.
Xml Tree Component
Hi I am trying to make a tree menu for a website that I can change via .xml file whenever any links change, can anyone help me?
Tree Component
I have question about the tree component that comes with Flash MX 2004 Pro.
What I’d like to do is to show the tree of say my music so starting with root as Music I'd have:
Music -> Dream Theater -> Falling Into Infinity -> 1 songs’ title.mp3
2 song’s title.mp3
.
.
etc.
I’d like to be able to determine if what I’m clicking on is a folder or a file and if it’s the file in mp3 format, the mp3 player (the one that also comes with Flash MX 2004 Pro called Media Player) would load that song an play it.
My tree component works so far with no problems. I see the tree there etc.
I simply don’t know how to determine what it is I’m clicking on at the moment. Also each time I click on mp3 file OS recognizes that it is an mp3 file format and automatically loads quicktime player, at least I think that it is an Operating system that does that.
I looked through the help files for tree component and tree object itself but the only events it supports are NodeOpen and NodeClose.
I though I could do something like that.
onMouseClick{
if it’s a folder I clicked on ignore it
if it’s a file and it is an mp3 file (I’ll do some validation) take the URL included in my XML file that is “attached to the tree component” and load that URL into the player….
}
Something like that would work I think, if I was able to use some mouse clicking event so I could use this even to determine the file/folder thing.
Any suggestion of how can this possibly be done?
Thanks
UI Component 16. TREE HELP
Is there a way to
1. have the tree open all the way or have main Nodes open to click on
2. After a user clicks on the Node of choice to send the user to a website or fire a differant type of event?
Thanks,
Still so new at this.
Steve
Tree Component
Can we not enter text manually into the tree component? From looking at the tutorial I got the impression that you can only load via XML ...
Any info would be appreciated
Sandman9
|