Why no Tree component for AS3?
Why is there no Tree component when working with an AS3 based
Flash 9 file?
Kevin
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=194&threadid =1262046&highlight_key=y&keyword1=accordian
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1262107&enterthread=y
Similar Messages
-
Hello ..
my problem is tree component and AS3 , before we hade such
easy time with tree component in as2 but now i founded that we cant
talk directly to tree component and we have to use API and XML ,
well i never liked XML and before i worked with tree component
directly and no problem but now , Flex force me to work with XML or
API(well I don’t know what dose it mean ) and I was tiring to
find any way to get directly to tree component in Flex2 and no
result … so my question , do I have use XML ? Is there any
another way to get to Tree Component ? I was looking in Flex help ,
and I find the help content is really bad . pleas help , I get
crazy about this problem …….
BWY this form work terrible on my PC ….. anyone have
same problem ?Use xml. Resistance is futile.
Tracy -
Customizing the Tree Component
Is there a way to set different font sizes and colors for
different levels of the tree menu?I am guessing that you are using AS2 components, as there is
not a default Tree component for AS3...
I don't know about font sizes, but you can set depth colors
for the AS2 Tree.
The following will set the background colors to black, medium
grey, lighter grey for the Tree that is named "myTree":
var colorArray:Array = new Array();
colorArray.push(0x000000);
colorArray.push(0x555555);
colorArray.push(0x999999);
myTree.setStyle( "depthColors", colorArray );
Note that this is based on the depth. IE for the node
structure:
<node label="First Level">
<node label="Second Level">
<node label="Third Level">
</node>
</node>
</node>
First Level with have a black background, Second Level will
have a medium grey background and Third Level will have a lighter
grey background. -
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.check out jumpeyecomponents.
-
2 Line Text for Tree Component
Hi
I am trying to use a tree component for a Course navigation ,
and I have a Node names Getting clipped and I wanted to have
mulitple lines in the tree node, I would appreciate if anyone could
help me in how the tree component can be extended to accomodate
this requirement.
Thanks
SembianHi Begum,
There are few default attributes you need to fill in your data structure,
PARENT_KEY - Parent (in your ex : header1, header2)
ROW_KEY - Children (col1, col2, col3, col4...)
EXPANDED
IS_LEAF -
TEXT
CHILDREN_LOADED
IMAGE_SRC
Include these fields with same name in your structure(structure of the table filling CT_DATA in GET_DATA method) and fill the relevant data, output will be displayed.
Cheers,
Vemula. -
I'm using the tree component for a little Windows Parody I'm making. In my .fla, There's a tree component that loads an external XML file. I can't figure out how to add custom icons to my component, though.
I know it's possible to set the icons for just the default folder and file icons, but since it's a Windows Parody, there'll be different icons for different file types, folder types, etc.
In other words, I'd like to have a different icon for every item in my Tree component.
How can I do this?
Here are the contents of my XML file:
<node>
<node label="Desktop">
</node>
<node label="Documents">
<node label="Pictures" isBranch="true" />
<node label="Movies" isBranch="true" />
<node label="Games" isBranch="true" />
<node label="Video" isBranch="true" />
</node>
<node label="Computer">
<node label="Local Disk (C:)" isBranch="true" />
<node label="Local Disk (D:)" isBranch="true" />
<node label="DVD-RAM Drive (E:)" isBranch="true" />
<node label="DVD/CD-RW Drive (F:)" isBranch="true" />
</node>
<node label="Readme.txt" isBranch="true" />
</node>
And the code on the first frame of my .fla file. The Tree's name is "fileTree", and the XML file is "doors_explorerXML.xml".
//Tree
var fileDP:XML = new XML();
fileDP.ignoreWhite = true;
fileDP.load("doors_explorerXML.xml");
fileDP.onLoad = function() {
fileTree.dataProvider = this.firstChild;
Also, I don't need to have an XML file loaded. If there's an easy way that does it all within Flash, please tell me. I just need to be able to handle events from the Tree.Im having the same issue. I dont know how to change the tree icons separately with the xml. Is there anyone who knows how to do it?
This is what I got so far. However, i can only get my first branch to show custom icons. I tried ALOT, but i guess I´m doing something completely wrong.
Here is the code for my tree so far:
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.load("tree.xml");
my_xml.onLoad = function(){
myTree.dataProvider = this.firstChild;
var folders = my_xml.firstChild.firstChild;
var docs = folders.childNodes;
for (var i=0; i < docs.length; i++){
currDoc = docs[i];
trace(docs[i]);
var docIcon = currDoc.attributes.pic;
switch(docIcon){
case "pdf":
myTree.setIcon(currDoc, "pdfIcon");
break;
case "word":
myTree.setIcon(currDoc, "wordIcon");
break;
case "excel":
myTree.setIcon(currDoc, "excelIcon");
break;
case "ie":
myTree.setIcon(currDoc, "ieIcon");
break;
}//switch
} //for
};//onLoad
And here is the XML I used:
<node label="» Dokument typer">
<node label="» links - document">
<node label="test.url" url="http://www." pic="ie" info="test text" />
<node label="test.doc" url="test.doc" pic="word" info="test text" />
<node label="test.excel" url="test.xls" pic="excel" info="test text" />
<node label="test.pdf" url="test.pdf" pic="pdf" info="test text." />
</node>
<node label="» Links - document">
<node label="test URL" url="http://www." pic="ie" info="test text." />
<node label="test URL" url="http://www." pic="ie" info="test text." />
</node>
</node> -
I have an issue with using tree component for our application. We need to provide expand/collapse facility for tree component (using default (+) and (-) icons). Does ADF_UIX support s for this situation. Please provide me any guideline....
I have an issue with using tree component for our application. We need to provide expand/collapse facility for tree component (using default (+) and (-) icons). Does ADF_UIX support s for this situation. Please provide me any guideline....
-
Hye guys,
I need a custom tree component for some xml elements that represent some files and their attributes. I have written one such component but what I need now to add to this component is Checkboxes.
The user is supposed to select files from this Tree component via these chk boxes.
Can someone point me in the direction of such an existing Tree component.
Or if I have to write one how do I go about it.
Pls donot point me to the Java tutorial. I read it but I still have a very very vague idea, if any idea at all, of doing this.
Regardsworth a look
http://forum.java.sun.com/thread.jsp?forum=57&thread=122006 -
When I click a leaf in the Tree Component I have a function
called using the itemClick Property. When I click a node (the
folder icons) I get the AS3 error below. Does this only show up
with Debug versions of Flash Player. Plus how do I stop this error
from occurring if the user happens to have the debug version
installed?
Error #2044: Unhandled ioError:. text=Error #2032: Stream
Error.
at main/loadMyXML()
at main/collectionSelect()
at main/__gTree_itemClick()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls.listClasses::ListBase/mouseClickHandler()
at mx.controls::Tree/mouseClickHandler()ORA-00600 internal errors should be reported to Oracle Support by SR. If you don't have a support contract try searching the web for more information and possible fixes or workarounds.
From the information available on MOS, if the type of the PG.ID_PAR_PLANO_GER column is not VARCHAR2, then try converting P22_ID_PAR_PLANO_GER to the same type. -
Horizontal scroll for Tree component scrolls too far right
I've enabled the horizontal scroll bar for the Tree component.
But the scroll bar allows the user to scroll very far to the right into blank space.
The maximum width of my components measures 124px, as calculated by measureWidthOfItems(0,0), and I've verified this by measuring pixels of a screen shot.
I have tried adding an event to set the Tree.maxHorizontalScrollPosition, and I traced the value that I'm setting it to, and I also traced the value that it actually assumed after I set it. Both are 124px.
So I can't understand the behavior. I can scroll something more like ~400px to the right with lots of blank space.
Any ideas why?
Thanks,
DavidHmm, I'm not sure why this works, but it works, so for completeness here's what I did (in case anyone else runs across this same thread):
var measWidth:Number = myTree.measureWidthOfItems(0,0);
filesTree.maxHorizontalScrollPosition = measWidth - myTree.width;
I call the above code whenever the window is resized (in my app there are 2 places that can cause a resize of the window, I manually added calls to a function with the above code). There is also an example out there that resizes any time the window is resized, but if you do this then you really can't have liveDragging=true in a DividedBox (which I have) because the cost of resizing is very high and overtaxes the cpu when called many times consecutively. I just call it when the dragging is finished (that way I have live dragging enabled, but it only updates the scroll bars when the user stops dragging, which is visually acceptable). -
Garbage Collection Issue for Tree Component
Dear:
When I created a new Tree instance dynamically by following code, and clicked any tree node randomly and then I removed it via another button, but I found this instance couldn’t be removed by GC, if I just created this tree without mouse action, it can be removed by GC.
Tree Component:
-- TreeView
<mx:canvas>
<mx:Tree dataProvider="{data}" /> // data is a XML staments
</mx:canvas>
Create Tree:
public function createView(event:Event):void{
var view:TreeView = new TreeView ();
view.name="myTree";
addChild(view);
view=null;
Remove Tree:
public function deleteView(event:Event):void{
var view:TreeView= TreeView( _con.getChildByName("myTree"));
removeChild(view);
Could someone give me some suggestion?
Thanks a lotHi ajmcfarlane,
This is my first post here. I'm fairly new to AS3 still and
have been getting my education from a number of places. The best
education i have found is from the book located at
http://www.learningactionscript3.com/
Rich Shupe address this problem of removing the child from
memory. I Downloaded your file and found 2 problems and resolved
one of them. By now you might have already solved this anyway.
To remove the child from the Display List use -->
removeChild(myChildObject);
To remove the object from memory use --> myChildObject =
null;
You did these two steps but in the incorrect order, just by
moving the 'myChildObject = null' under the removeChild code makes
it work.
I found running a few trace statements after fixing the first
problem, i found the second problem. The error of trying to remove
a child when it is no longer there.
You just need to rework the design so that the order of
events fires as you want. Below is the traces i used and the output
that is received.
function Click1(e:MouseEvent){
trace("four ", loadedcontent);
modLoader.unload();
modLoader = null;
function unloadCompleteHandler(event:Event):void{
trace("one ", loadedcontent);
removeChild(loadedcontent);
trace("two ", loadedcontent);
loadedcontent = null;
trace("three ", loadedcontent);
output
Loaded mem: 20668 KB
four [object MainTimeline]
one [object MainTimeline]
two [object MainTimeline]
three null
unLoaded mem: 23352 KB
So you can see the click event is firing of the unload first,
when i think you want that last.
I hope this has been of some help :) -
Code for Tree component(tomahawk )
I am new to JSF,I want a tree component in my page and i want to construct the tree by retriving data from database.I searched most of materials but could'nt find any good one.
How would it match the trees? What have you done so far?
/Kaj -
Save last selected and state for Tree Component?
I have a Tree component that refreshes its data everytime I
open the Tab containing it (doing a SQL call to return an index of
models). The problem is that everytime the dataProvider changes (a
new one overwrites the old one) with databinding, even if the data
is exactly the same, it loses its old state and selected node. Is
there any way to save this state/selected node when the
dataProvider updates?good article on all aspects of trees including your issue.
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/ -
Tree Component ... getting crazy !
So tree component is terrible , every thing is gone , trying
all day to get directly to tree component and no result ,and there
is no basic explanation and no examples , i tried to search in Flex
Help Content , but I get more Cold Fusion tree help than Flex tree
.. spend 800 dollar for flex and get CFHelp , I don’t think
is good idea , so pleas help me , how can i add simple tree node
with out XML , I hate XML , and i know some how we can work with
Tree component directly though ITreeDataDescriptor , but how ..?
In As2 it was simple and easy, now how to do this I
don’t know and I am not only one!
I am not a specialist in Action Script but in AS2 I never had
a problem, and if I did, we have a lot of documentation about AS2
and examples, but Flex trying to sell a product that not supports
any examples and documentation... Write in search content
‘tree’ and you get cf tree examples and structures, but
I don’t need cftree information, I need flex tree exemplas,
but there is few... Working with flex all week I get more tired and
depressed.. Any thing I trying to do is going wrong, AS2 is not
there any more and I understand that I have to learn AS3 from
beginning to understand it... I hate it!!!!!!
Flex - Rich Application for users and Rich work for
Developers!Eddy, chill out man.
How can you say, "I hate XML," and really even try to learn
Flex? Flex is based on XML, MXML is XML, any services you call
(HTTP or WEB) are XML. I think it's time for change and time you
picked up XML. It's actually very, very simple.
You don't have to learn AS3 from the ground up. There are a
lot of similarities between AS2 and AS3.
You just need to write a simple function which goes through
the array and converts it to xml. While I could program that for
you, I think you could probably figure it out yourself.
But why even bother? Using an XMLList is just as easy.
Behold:
<mx:XMLList id="treeData">
<node label="Mail Box">
<node label="Inbox">
<node label="Marketing"/>
<node label="Product Management"/>
<node label="Personal"/>
</node>
<node label="Outbox">
<node label="Professional"/>
<node label="Personal"/>
</node>
<node label="Spam"/>
<node label="Sent"/>
</node>
</mx:XMLList>
XML is composed of parents and children. You can do much more
with XML than you can with plain old arrays, plus, when's the last
time you saw a 10-tiered multi-dimensional array? It's not possible
to do something like that without XML.
Over and out - Taka. -
I have a swf file that is a Tree Component... (So when it
diplays it looks like a Directory structure with folders and files)
Some nodes access url links... And some access .doc files on
the network... This works fine when I run it from my local site,
but when I run it on the remote site (Intranet server) the nodes
that reference file paths so nothing, instead of opening the file,
the url type links do work fine on the remote site.
Any thoughts on why this might be occurring ? I am putting
the swf and the associated xml file and html page on the remote
site... Am I missing a file or setting on the server that I have
locally? I am also including my .as file and xml file for review.
Any help would be greatly appeciated.
xml code:
<node>
<node label="Training Information" data="">
<node label="HP Learning Center" url="
http://h30187.www3.hp.com"
/>
<node label="HP Class Schedule" url="
http://h30187.www3.hp.com/all_courses.jsp"/>
<node label="Excel Charting Tips" data="IT Web
Docs/Advanced Tips and Tricks for Excel Charting.wmv" />
<node label="Email Contacts" data="file:///P|/IT
information/Tips/Contacts - Keeping track.doc" />
<node label="Assigning Tasks in Outlook" data="IT Web
Docs/Assigning and tracking tasks in Outlook.doc" />
</node>
<node label="Technical Documentation" data="">
<node label="myMCC Info Guide" data="IT Web
Docs/MyMccIntro.pdf" />
<node label="MCC Webex Guide" data="IT Web
Docs/MCCWebex.pdf" />
<node label="Scudder Access Guide " data="IT Web
Docs/AccessDWS-Scudder.pdf" />
<node label="VPN Install Guide" data="IT Web
Docs/MCCCitrixAccessGatewayVPN-Install.pdf" />
<node label="VPN User Guide" data="IT Web
Docs/MCCCitrixAccessGatewayVPN-Use.pdf" />
<node label="Samsung i830 Guide" data="IT Web
Docs/Samsung_i830_User_Guide.pdf" />
<node label="Treo 700w Guide" data="IT Web
Docs/treo_700w_user_manual.pdf" />
</node>
</node>
Action Script 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", 6);
menuTree.fontSize = 14;
menuTree.setSize(250, 300);
menuTree.move(0,0);
// 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;
var file = node.attributes.data;
if (url) {
getURL(url, "_blank");
else {
getURL(file, "_blank");
// Clear any selection.
menuTree.selectedNode = null;
function onMenuLoaded() {
menuTree.dataProvider = menuXML.firstChild;
menuTree.addEventListener("change", this);
This does work fine locally... But the file paths node do not
work when I publish to the Intranet server.
Thanks-DaveIt is quite a pain in the rear to skin the AS2 components.
And I don't know of many 3rd party components for AS2. I know of
plenty AS3 3rd party components, but if you were using AS3
components you wouldn't need a Tree to replicate the adobe video
workshop type navigation, all you would need is the built in List
component. If you can go sans icons, I would suggest using the AS2
List to get the feel you're looking for.
Maybe you are looking for
-
I have Window XP Pack 3 I had Norton 360 version 5 I upgraded Norton at their suggestion to Norton 360 Version 6.2.0.9 Before the Norton safe web toolbar was working fine After the update it does not show / work and the Norton Vulnerability Protectio
-
Cannot figure out workflow in Pages 5.1
I am not sure if this is an iCloud, iWork, Pages, iPad, Mavericks or iOS issue. Please redirect me if that would be better. I use documents from all kinds of applications: Sibelius (music notation software), pdf, sound, word (Microsoft), pages (iWork
-
Hello All, I just replaced the motherboard on our HP zd8000 (pentium 4, 3.0ghz, 2gb ram, Win XP) with a used but tested good MB and need some help with the following. 1) I now cannot play DVD movies as the error no "dvd decoder" present which was no
-
Where is the option to hide/show side bar??
since i just did the new update 12.1.0.50 a few moments ago, it resolved the matter of not having the side bar, but now you cannot make it go away. what are you guys doing? first you take it away from us, now we cannot get rid of it. can you pleas
-
Party-Relationships in Installed Base
Hi, Can anybody highlight on purpose/uses/advantages of setting party relationships in Installed base. What can be acheived by creating these relationships? Regards, Mohammed