Custom icon per entry in the AS2 Tree Component (using CS3)

I have a tree component that loads its data from an XML file and I wonder if I can customize every entry to have its own icon by adding an icon attribute to every entry in the XML and giving the tree an action to read that icon (which would exist in the library of the Flash file). My goal is to reproduce a tree within an application that my company is developing (it's for a training tool related to that application).
My XML says something like <node label = 'Label' heading = 'LABEL' desc = 'Description' icon = 'icon1' />
My label is what the tree displays, the heading is what the information dialog in the training tool displays as a title bar, the desc is what the training tool displays within the body of the text for the function description and the icon is what I want to be a reference to the graphic in the library to place as an icon in front of the item rather than use setStyle with the properties for disclosure, leaf, and folder icons.
Is that possible? I haven't found a solution for it yet.

I've never used the Tree component, so I'm just guessing here....
There is a slight delay before the xml file loads and your tree has its data provider.
Perhaps during that time there is no node at mTree.getTreeNodeAt(0) to open? Try adding this just before the last line of your code:
trace("the node is: "+mTree.getTreeNodeAt(0));
What do you get?
You might need to move that code inside the xml's load event handler.
Another thing is that the Flash components tend to work on an invalidate-then-wait-one-frame-to-redraw kind of model. So it is possible you will need to wait one frame after the xml has loaded and then tell it to open that node.
The doLater method might help with that.
var home:MovieClip=this;
var xmlTreeData:XML = new XML();
xmlTreeData.onLoad = function() {
mTree.dataProvider = this.firstChild;
mTree.doLater(home,"delay");
xmlTreeData.ignoreWhite = true;
xmlTreeData.load("xml/treeValues1.xml");
mTree.setStyle("fontSize","11");
mTree.setStyle("selectionColor","0xE0E0E0");
mTree.setStyle("useRollOver",false);
function delay(){ 

Similar Messages

  • Questions about AS2 Tree Component (Flash CS3)

    I have Flash application with a Tree component on the Stage. I'm using an XML file to create the structure of the Tree component.
    Each entry on my XML has the attributes id, label, heading, desc, and icon.
    My problem is that I can't seem to be able to set the Tree to default with the first node open.
    My code is:
    var xmlTreeData:XML = new XML();
    xmlTreeData.onLoad = function() {
    mTree.dataProvider = this.firstChild;
    xmlTreeData.ignoreWhite = true;
    xmlTreeData.load("xml/treeValues1.xml");
    mTree.setStyle("fontSize","11");
    mTree.setStyle("selectionColor","0xE0E0E0");
    mTree.setStyle("useRollOver",false);
    mTree.setIsOpen(mTree.getTreeNodeAt(0), true);
    My tree populates fine, and the handler I retrieve whatever item is clicked works great. However, the tree refuses to default to having that first node open.
    I'm also interested in placing custom icons into certain nodes via the icon attribute I've set in the XML, but that will have to come later I guess.

    I've never used the Tree component, so I'm just guessing here....
    There is a slight delay before the xml file loads and your tree has its data provider.
    Perhaps during that time there is no node at mTree.getTreeNodeAt(0) to open? Try adding this just before the last line of your code:
    trace("the node is: "+mTree.getTreeNodeAt(0));
    What do you get?
    You might need to move that code inside the xml's load event handler.
    Another thing is that the Flash components tend to work on an invalidate-then-wait-one-frame-to-redraw kind of model. So it is possible you will need to wait one frame after the xml has loaded and then tell it to open that node.
    The doLater method might help with that.
    var home:MovieClip=this;
    var xmlTreeData:XML = new XML();
    xmlTreeData.onLoad = function() {
    mTree.dataProvider = this.firstChild;
    mTree.doLater(home,"delay");
    xmlTreeData.ignoreWhite = true;
    xmlTreeData.load("xml/treeValues1.xml");
    mTree.setStyle("fontSize","11");
    mTree.setStyle("selectionColor","0xE0E0E0");
    mTree.setStyle("useRollOver",false);
    function delay(){ 

  • Substituting a Custom Icon in Place of the Folder Icon

    Hello again...
    I just learned about putting a folder on the dock to display a group of aliases for my applications, so I could be able to start the applications with a single-click. Is there any way to not have the "Folder" as the icon for this, but something custom that I create using some sort of icon creation program?

    What you need to do is create the folder, give it a custom icon, drag it to the dock and then right click it and choose Display as Folder from the menu.

  • Has anymore experienced their app icons appearing so huge the you can't use your iPhone . I've done everything i can think of. restored my software and re sinked to no avail.

    has anymore experienced their app icons appearing so huge the you can't use your iPhone . I've done everything i can think of. restored my software and re sinked to no avail.

    This is asked ans answered ofeten.  The forum search bar is on the right side of this page.
    It is also covered in the manual:  Zoom feature:
    iPhone User Guide (For iOS 4.2 and 4.3 Software)
    Double tap with three fingers.

  • Adding entries to the JNDI tree

    Is it possible to add entries to the JNDI path of the OC4J server? I know you can add it via web.xml, but I´m looking into doing that manually through the admin console?
    Thanks,
    Mario

    True. At the end I configured the value as a "server property". The cool thing about configuring the jndi tree is that it is replicated in a cluster.
    Obviously the values that I inserted affected all the applications, like the url of our SOA server.

  • Speed dial only has one icon, to open up the windows. Another used to be on the other end of the tool bar for entering websites into the windows. Also do not know how to form another group.

    I have just downloaded Firefox into a new computer. The firefox I had in my old computer had one (9 pt) icon at one end that brought up the speed 9 speed dial windows. It also had another similar icon at the other end of the tool bar that you could click on and place a website you were looking at into a particular window. This add on does not have that feature, which makes it very hard to make entries into the windows.
    Also I have not found the way to add other groups of windows as I had before. I could even label them in categories. What to do?
    My Computer is an HP p6653w and my default browser is Firefox 3.6
    My operating system is windows 7.

    Hi,http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03149924&cc=uk&dlc=en&lc=en#N89
    First, I am sorry to see your experience, however be aware that this forum is a peer-to-peer community and not a direct contact with HP.
    To clarify, the product specification do list the ink cartridges regionalization, the specifications itself reffer to HP Suresupply to locate the ink cartridges for your region, as well as the following document which clearly state that information:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03239171&tmp_task=prodinfoCategory&cc=uk&dlc=en...
    Firs be sure to have the latest software installed prior contacting HP support, which should be listed as 28
    You may find that information listed in the following document (Check the How can I tell which driver version I have? section), if you have any older version be sure to uninstall it and install the latest software, as listed within the same document:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03149924&cc=uk&dlc=en&lc=en#N89
    If you need, the latest software can be found below:
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=mp-108821-3&cc=uk&dlc=en&lc=en...
    Next ensure you have any of the 564 ink cartridges, once the printer being reset it require all the 4 ink cartridges to work
    Finally check the private messages I sent you prior contacting HP support , the envelope icon at the top-right part of that screen.
    The ensure you use the correct contact details lease double chekc it below:
    http://www8.hp.com/us/en/contact-hp/phone-assist.html#section1
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How to add users/entry in the oracle internet directory using XML file

    hi friends,
    i need to know how to add entries, attributes in the oracle internet directory using the XML file.

    I could able to execute the ldapadd command with out error as
    ldapadd -h islch-532.i-flex.com -p 389 -D "cn=orcladmin" -w password -X mypath/filename.xml
    but the data entry is not added in OID. can any one help me out.

  • Tree component flash cs3 multiline/wordwrap

    Hi All,
    I have a tree component customized ..now i am stuck at the
    length of the text ..i need to have the text in the tree node to
    word warp for lengthy text..
    thank you for the help in advance..
    kakas

    nothing so far..really needed it very urgently!
    thx again
    kakas

  • Unable to create the entry in the AS2 EDIINT MIC table

    This could be caused by duplicate AS2-From, AS2-To and MessageID combinations being written to the table.  Error: Violation of PRIMARY KEY constraint 'PK_EdiInt_Mic'.
    Cannot insert duplicate key in object 'dbo.EdiInt_Mic'. 
    How to reprocess this feed?

    Hi,
    To resolve this error, check the full error message for information about why the insert operation failed. In SQL, in the EDIINT_MIC table, determine whether there is duplicate AS2-From and AS2-To MessageID combinations. If so, remove them.
    For more information, you can refer the document:
    http://msdn.microsoft.com/en-us/library/bb967928.aspx
    Hope it can help you.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create custom thumbnails per episode like the TED videos on Apple TV?

    Not many podcasts do this but I do see TED for example have a different thumbnail per episode on Apple TV (note: iTunes shows different thumbnials because it picks a frame from the video). I'm referring to Apple TV 2 to be precise. Can't figure this out....
    Thanks in advance,
    -g
    PS Our podcast is ChatChow.tv

    They're the same podcast: one is the feed and one is the iTunes Store page. I checked the latest episode: it has an image embedded in the media file which shows until you start playing the video (right).
    There are also two additional tags in within the 'item' tags for the episode, a 'media:thumbnail' tag and an 'itunes:image' tag, both containing an image of a saucepan of brussel sprouts:
    neither of these tags is recognized by iTunes (only the 'itunes:image' tag in the top section of the feed, and that only in the Store, not when subscribing).
    What does the Apple TV show? - is it this image?

  • Making a one to many relation it to columns per entry of the many relation

    CREATE TABLE main (id number, data varchar2(20));
    INSERT INTO main values (1,'some data1');
    INSERT INTO main values (2,'some data2');
    CREATE TABLE sub(main_id number, data varchar2(20), value number);
    INSERT INTO sub values (1,'data1', 10);
    INSERT INTO sub values (1,'data2', 5);
    INSERT INTO sub values (2,'data3', 10);
    INSERT INTO sub values (2,'data4', 30);
    INSERT INTO sub values (2,'data5', 20);
    I want a result like this
    id | data | sub1 | sub2 | sub3
    1, some data1, data1, data2, NULL
    2, some data2, data4, data5, data1
    That is sub1 is the value sub.data that has the largest value, sub2 is the second largest and so on.
    This is the closest I can get. Is there a way to make the where main_id = 1 dynamic so instead of 1 it refeers to the value of main.id? Or is there a different query that will give me the result I'm looking for?
    SELECT main.id, main.data, sub1.data sub1, sub2.data sub2, sub3.data sub3
    FROM main
    full outer join
    (SELECT main_id, data, value
    FROM(SELECT main_id, data, value, rownum rn
    FROM(SELECT *
    FROM sub
    WHERE main_id = 1
    ORDER BY value desc))
    WHERE rn = 1) sub1
    on main.id = sub1.main_id
    full outer join
    (SELECT main_id, data, value
    FROM(SELECT main_id, data, value, rownum rn
    FROM(SELECT *
    FROM sub
    WHERE main_id = 1
    ORDER BY value desc))
    WHERE rn = 2) sub2
    on main.id = sub2.main_id
    full outer join
    (SELECT main_id, data, value
    FROM(SELECT main_id, data, value, rownum rn
    FROM(SELECT *
    FROM sub
    WHERE main_id = 1
    ORDER BY value desc))
    WHERE rn = 3) sub3
    on main.id = sub3.main_id
    ID     DATA     SUB1     SUB2     SUB3
    2     some data2     -      -      -
    1     some data1     data1     data2     -

    SQL> select main.id
      2       , main.data
      3       , max(decode(sub.rn,1,sub.data)) "sub1"
      4       , max(decode(sub.rn,2,sub.data)) "sub2"
      5       , max(decode(sub.rn,3,sub.data)) "sub3"
      6    from main
      7       , (select t.*, row_number() over (partition by main_id order by data) rn from sub t) sub
      8   where sub.main_id = main.id
      9   group by main.id
    10       , main.data
    11  /
            ID DATA                 sub1                 sub2                 sub3
             1 some data1           data1                data2
             2 some data2           data3                data4                data5
    2 rijen zijn geselecteerd.Regards,
    Rob.

  • I have a website done using CS3. Can I create galleries with CS6 like the one I do using CS3?

    I have tried to use CS6 to create galleries like the on CS3 can create to update my website but I cannot reproduce what I do in CS3 can somebody help me?
    Thank you very much.
    Regards
    Francesco

    fsveltophoto wrote:
    I have tried to use CS6 to create galleries like the on CS3 can create to update my website but I cannot reproduce what I do in CS3 can somebody help me?
    The answer is maybe. I do not know if you can on a Mac I know MAC is 64 Bit only and the was no 64bit Picture Package Plug-in for the Mac CS5. I do not know about Mac Web Photo Gallery.
    If your using windows and have the perpetual version of  CS6  version 13.0.1.2 for windows you can install the CS5 optional plug-ins for Photoshop into that version of CS6.   Web Photo Gallery (WebContactSheetII) plug-in will function if you install the necessary files.  However if your a subscriber to CC some plug-in support has been removed from CS6 version 13.1.2 and CC.  A Feature that old plug-ins like Web Photo Gallery and Picture Package used is no longer available in Photoshop.
    Adobe did add a poorer web gallery feature into the Bridge's output module but the new galleries can not be customized as well as  Photoshop old Web Photo Gallery can be customized..

  • How to set the default focus component using FocusTraversalPolicy class??

    hi all...
    I have a JPanel, of which setFocusCycleRoot() has been made true. I am trying to make sure that whenever I open this panel, the first JTextField must have the focus.
    the problem is that I have to hit the tab key once, ay satrtuptime. after that all works fine. Kindly rell me a way to eliminate this first-time tab key hitting.
    please note that I have extended FocusTraversalPolicy class and have defined all its methods accordingly....
    thanx...

    try this at the end of your constructor:
    myTextField.requestFocusInWindow();
    it works in my login panel that wants to focus the second password field after i added the panel to the internal frame.

  • Is there a way make a full width menu that opens with a custom icon like the link below?

    I've been trying to make a hamburger menu that just has a custom icon to open revealing the sections of my site with links.
    Huge. Digital agency. Digital business, design, marketing, technology
    Anybody got any tips?
    Thanks

    You can use a lightbox composition

  • 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.

Maybe you are looking for

  • How to Hide main user's files in useraccount's finder navigation?

    Ok So you're the main user of the computer. YOu make an account for someone to use. I made it simple finder. with access to Safari and Text edit. In my account i have files and folders all around the computer in the MAC HD folder and stuff, in the DO

  • USB 1.1 vs. 2.0`

    Can I use a device with USB 2.0 with my Graphite SE iBook? I understand that it is a software issue. I need to get a new scanner but the newer ones have USB 2.0. Will it just run slower or is it not compatable? iBook SE Graphite Firewire   Mac OS X (

  • Deployment of SAP mappings

    i have created numerous mapping in OWB to extract, transform and load data from SAP tables. this of course includes dimension and fact data. i understand that they are ABAP mappings so ABAP source code and an SQL Loader control file will be created f

  • Graphics card issue - Satellite A100-313 shuts down by itself

    I have a satellite A100-313 and I'm using vista. Everytime when I play games, the notebook shuts itself off after some time. It varies, normally have 10-20min of playing. And when I immediately turn it on again, I get a black screen but the computer

  • Pwmif64v.d​ll PC-Doctor Module has stopped working

    Hey everyone, I have a W510 4318CTO (still under warranty) and have recently I've been getting this PC-Doctor Module crash message every time I come home from work.  Doesn't seem to matter if I've recently rebooted the machine or not, but it comes up