User Guide
Customizing the Tree component (Flash Professional only) 1277
For example, the following code creates a Tree instance first_tr using
UIObject.createClassObject(), populates the tree using a data provider, and then uses
UIObject.setStyle() to change the indentation of the nodes of the tree to 8 pixels. Drag a
Tree component to the current document’s library and then add the following to the first
frame of the main timeline:
import mx.controls.Tree;
this.createClassObject(Tree, "first_tr", 20);
first_tr.setSize(200, 100);
first_tr.move(0, 120);
var trDP_xml:XML = new XML("<node label='1st Local Folder'><node
label='Inbox' data='0'/><node label='Outbox' data='1'/><node label='2nd
Local Folder'><node label='Inbox' data='0'/><node label='Outbox'
data='1'/></node></node>");
first_tr.dataProvider = trDP_xml;
first_tr.setStyle("indentation", 8);
selectionEasing
Both A reference to the easing equation used to control the
transition between selection states. Applies only for
the transition from a normal to a selected state. The
default equation uses a sine in/out formula. For more
information, see “Customizing component
animations” in Using Components.
textRollOverColor
Both The color of text when the pointer rolls over it. The
default value is 0x2B333C (dark gray). This style is
important when you set
rollOverColor, because the
two must complement each other so that text is easily
viewable during a rollover.
textSelectedColor
Both The color of text in the selected row. The default
value is 0x005F33 (dark gray). This style is
important when you set
selectionColor, because the
two must complement each other so that text is easily
viewable while selected.
useRollOver
Both Determines whether rolling over a row activates
highlighting. The default value is
true.
Style Theme Description