1 Reply Latest reply on May 10, 2010 10:37 AM by GordonSmith

    Can i create a tree component in ActionScript?

    sulemarak

      Hi,

           I need to create a tree component using ActionScipt.  The point is that if you Actioscipt to create it, I can´t use the same parametres as if it is build using MXML code.

           In ActionScipt:

      <mx:Script>

       

      <![CDATA[

       

                     var t:Tree=new Tree();

                     // i can´t do this

                     t.dataProvider = any XMLListCollection

                     // neither this

                     t.labelFunction=treeLabel;

       

       

      ]]>

      </mx:Script>

       

           I must use the tree component using <mx:Tree id="tree1" width="100%" height="100%" styleName="Tree" wordWrap="true"/>.

       

           Depending on how my XML is done, i'm gonna need different amount of trees components, that's why i want to create them while i need them by actionscipt.

           The options between using Tree component with MXML and Actionscipt are different.  Is there a way to create a MXML component by ActionScipt?

       

      Can anyone help me please?, thanks a lot!