MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1282

Components language reference
Table of Contents

Advertisement

Setting styles for all Tree components in a document
The Tree class inherits from the List class, which inherits from the ScrollSelectList class. The
default class-level style properties are defined on the ScrollSelectList class, which the Menu
component and all List-based components extend. You can set new default style values on this
class directly, and the new settings are reflected in all affected components.
_global.styles.ScrollSelectList.setStyle("backgroundColor", 0xFF00AA);
To set a style property on the Tree components only, you can create a new
CSSStyleDeclaration
import mx.styles.CSSStyleDeclaration;
if (_global.styles.Tree == undefined) {
_global.styles.Tree = new CSSStyleDeclaration();
}
_global.styles.Tree.setStyle("backgroundColor", 0xFF00AA);
When you create a new class-level style declaration, you lose all default values provided by the
declaration. This includes
ScrollSelectList
supporting mouse events. To create a class-level style declaration and preserve defaults, use a
loop, as follows, to copy the old settings to the new declaration.
for
var source = _global.styles.ScrollSelectList;
var target = _global.styles.Tree;
for (var style in source) {
target.setStyle(style, source.getStyle(style));
}
Using skins with the Tree component
The Tree component uses an instance of RectBorder for its border and scroll bars for scrolling
images. For more information about skinning these visual elements, see
on page 1063
and
"Using skins with the UIScrollBar component" on page
Tree class (Flash Professional only)
Inheritance
MovieClip >
ScrollSelectList >
List component
ActionScript Class Name
The methods, properties, and events of the Tree class allow you to manage and manipulate
Tree objects.
1278
Tree component (Flash Professional only)
instance and store it in
UIObject class
>
> Tree
mx.controls.Tree
_global.styles.DataGrid
, which is required for
backgroundColor
UIComponent class
.
"RectBorder class"
1394.
> View > ScrollView >

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents