User Guide

Customizing the Tree component (Flash Professional only) 1273
5. Select Control > Test Movie.
In the SWF file, you can see the XML structure displayed in the tree. Click items in the
tree to see the
trace() statements in the change event handler send the data values to the
Output panel.
To use a well-formed string to create XML in Flash while authoring:
1. In Flash, select File > New and select Flash Document.
2. Drag an instance of the Tree component onto the Stage.
3. Select the Tree instance. In the Property inspector, enter the instance name myTree.
4. In the Actions panel on Frame 1, enter the following code:
var myTreeDP:XML = new XML("<node label='Local Folders'><node
label='Inbox' data='0'/><node label='Outbox' data='1'/></node>");
myTree.dataProvider = myTreeDP;
This code creates the XML object myTreeDP and assigns it to the dataProvider property
of
myTree.
5. Select Control > Test Movie.
In the SWF file, you can see the XML structure displayed in the tree. Click items in the
tree to see the
trace() statements in the change event handler send the data values to the
Output panel.
Customizing the Tree component (Flash
Professional only)
You can transform a Tree component horizontally and vertically while authoring and at
runtime. While authoring, select the component on the Stage and use the Free Transform tool
or any of the Modify > Transform commands. At runtime, use the
setSize() method (see
UIObject.setSize()). When a tree isnt wide enough to display the text of the nodes, the
text is clipped.