Customizing The Tree Component (Flash Professional Only) - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

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()
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
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()
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
UIObject.setSize()
text is clipped.
statements in the
myTreeDP
statements in the
). When a tree isn't wide enough to display the text of the nodes, the

Customizing the Tree component (Flash Professional only)

event handler send the data values to the
change
and assigns it to the
event handler send the data values to the
change
property
dataProvider
method (see
setSize()
1273

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents