ActionScript Properties
| Inheritance | MovieClip > UIObject class > AccordionTreeMenu class |
Setting a property of the AccordionTreeMenu class with ActionScript overrides the parameter of the same name set in the Component inspector. Setting a property in the XML file overrides that of the same name set with ActionScript (if the later has been applied not at run time).
Properties inherited from the UIObject class
The following table lists the properties the AccordionTreeMenu class inherits from the UIObject class.
| Property |
Description |
| UIObject.left |
Read-only; the left edge of the object, in pixels. |
| UIObject.top |
Read-only; the position of the top edge of the object, relative to its parent. |
| UIObject.visible |
A Boolean value indicating whether the object is visible (true) or not (false). |
| UIObject.x |
Read-only; the left edge of the object, in pixels. |
| UIObject.y |
Read-only; the top edge of the object, in pixels. |
Properties unique to the AccordionTreeMenu class
The following table lists properties of the AccordionTreeMenu class.
my_menu.decorationHeight
Property; the height, in pixels, of the top and bottom decorations. Possible values: from 0 to the value of a top level item height. If decorationHeight is equal to 0, then no decoration will be drawn. The default value is 0.
The following example sets the decorationHeight property to 5 pixels:
my_menu.decorationHeight = 5;
my_menu.decorationRounded
Property; a string that specifies which corners of the menu decoration to be drawn rounded. This property can be one of four predefined values: "left", "right", "all", "none". The default value is "all".
The following example sets the decorationRounded property to "right":
my_menu.decorationRounded = "right";
my_menu.dottedLineL2
Property; indicates whether the dotted lines for second level sub-menus to be drawn ("true") or not ("false"). If dottedLineL2 is set to "false", then no tree icons are drawn, and each second level menu item (if it has nested third level sub-menu) stays open permanently. The default value is "true".
The following example sets the dottedLineL2 property to "false":
my_menu.dottedLineL2 = false;
my_menu.dottedLineL3
Property; indicates whether the dotted lines for third level sub-menus to be drawn ("true") or not ("false"). The default value is "true".
The following example sets the dottedLineL3 property to "false":
my_menu.dottedLineL3 = false;
my_menu.easingClass
Property; a string that specifies which easing class to be applied when opening or closing a second level menu item. This property can be either "regular" or "none". The default value is "regular".
The following example sets the easingClass property to "none":
my_menu.easingClass = "none";
my_menu.easingMethod
Property; a string that specifies which easing method to be applied when opening or closing a second level menu item. This property can be one of three predefined values: "easeIn", "easeOut" or "easeNone"; the default value is "easeOut".
The following example sets the easingMethod property to "easeIn":
my_menu.easingMethod = "easeIn";
my_menu.initialStateReturn
Property; instructs the menu how to behave when the mouse pointer rolls out of an open top level item outside the menu area. There are two values available:
true The open top level item remains open.
false The menu returns to its initial state. If selectedStateMode is set to "true" and the selectedIndex property has a definite value, then the top level item including nested item, which index is equal to the selectedIndex value, will be opened. If there is no item selected, the open top level item will be closed.
The default value is "true".
The following example sets the initialStateReturn property to "false":
my_menu.initialStateReturn = false;
my_menu.internalSelectionMode
Property; turns on/off the component's ability ("true" or "false") to make an item selected when it is clicked. That means the Accordion Tree Menu can change the value of the selectedIndex property inside a movie clip without reloading HTML page. This option is useful, first of all, for Flash-based web applications. For this property to be activated, selectedStateMode has to be set to "true". The default value is "false".
The following example sets the internalSelectionMode property to "true":
my_menu.internalSelectionMode = true;
my_menu.itemHeightL1
Property; the height, in pixels, of each top level item. The value of this property is controlled programmatically, considering specified font size and font family. The default value is 24.
The following example sets the itemHeightL1 property to 30:
my_menu.itemHeightL1 = 30;
my_menu.itemHeightL2
Property; the height, in pixels, of each second and third level item. The value of this property is controlled programmatically, considering specified font size and font family. The default value is 20.
The following example sets the itemHeightL2 property to 24:
my_menu.itemHeightL2 = 24;
my_menu.itemIndentL2
Property; indicates whether to indent the second level items. The amount of indent is determined programmatically. The default value is "true". If both itemIndentL2 and topLevelIcons properties are set to "false", then neither tree icons nor dotted lines for second level sub-menus are drawn, and each second level menu item (if it has nested third level sub-menu) stays open permanently.
The following example sets the itemIndentL2 property to "false":
my_menu.itemIndentL2 = false;
my_menu.itemIndentL3
Property; indicates whether to indent the third level items. The amount of indent is determined programmatically. The default value is "true". If itemIndentL3 is set to "false", then no dotted lines for third level sub-menus are drawn.
The following example sets the itemIndentL3 property to "false":
my_menu.itemIndentL3 = false;
my_menu.itemSeparatorsL1
Property; determines whether to draw separator lines between the top level menu items. The default value is "true".
The following example sets the itemSeparatorsL1 property to "false":
my_menu.itemSeparatorsL1 = false;
my_menu.itemSeparatorsL2
Property; determines whether to draw separator lines between the second level menu items and between the third level menu items. The default value is "false".
The following example sets the itemSeparatorsL2 property to "true":
my_menu.itemSeparatorsL2 = true;
my_menu.leftMargin
Property; the left margin of the menu, in pixels. Accepts values from 0 to 100. The default value is 0.
The following example sets the leftMargin property to 20:
my_menu.leftMargin = 20;
my_menu.menuWidth
Property; the width of the menu, in pixels. The default value is 100.
The following example sets the menuWidth property to 200:
my_menu.menuWidth = 200;
my_menu.selectedIndex
Property (read-only); the index position of the selected menu item. The value is undefined if nothing is selected. The selectedIndex property has a definite (not undefined) value in the following three cases:
- The variable
selIndex is passed to a SWF (containing Accordion Tree Menu component instance) through HTML tags (see example for more information). If the component instance is not at the top level of a movie, you must specify the selIndex variable at the component's level.
- The
internalSelectionMode property is equal to "true" and a menu item has been clicked.
- The
setItemSelected() method has been called.
The following example gets the value of the selectedIndex property:
trace(my_menu.selectedIndex);
my_menu.selectedStateMode
Property; turns on/off the component's ability ("true" or "false") to make an item selected if the selectedIndex property has a definite value. The default value is "true".
The following example sets the selectedStateMode property to "false":
my_menu.selectedStateMode = false;
my_menu.topLevelIcons
Property; determines whether to draw the arrow icons for the top level menu items. If both topLevelIcons and itemIndentL2 properties are set to "false", then neither tree icons nor dotted lines for second level sub-menus are drawn, and each second level menu item (if it has nested third level sub-menu) stays open permanently. The default value is "true".
The following example sets the topLevelIcons property to "false":
my_menu.topLevelIcons = false;
my_menu.treeStructure
Property; specifies the appearance and initial state of Accordion Tree Menu structure. This parameter can be one of three predefined values:
open Each second level menu item that has nested third level sub-menu is in open state, and can be closed by clicking on appropriate tree icon.
close Each second level menu item that has nested third level sub-menu is in closed state, and can be opened by clicking on appropriate tree icon.
static Each second level menu item that has nested third level sub-menu stays open permanently. No tree icons are drawn.
The component's structure appearance is also depends on values combination of the following properties: topLevelIcons, itemIndentL2 and dottedLineL2. The default value is "close".
The following example sets the treeStructure property to "static":
my_menu.treeStructure = "static";
my_menu.tweeningDuration
Property; a number indicating the duration of the tweened animation in seconds. The tweened animation is applied to each third level sub-menu during its movement up and down. This parameter accepts values from 0.05 to 0.5. The default value is 0.3.
The following example sets the tweeningDuration property to 0.5:
my_menu.tweeningDuration = 0.5;
|