Search Flex Components Free

Custom Search

December 17, 2007

Customizing the menu tree component in flash

If you like to customize (skinning) the look of your menu tree component in flash please take a look at the following examples of the properties you can change.

public var myTree:Tree;

myTree.setStyle(”fontSize”, “10″);
myTree.setStyle(”fontFamily”, “Verdana”);
myTree.setStyle(”backgroundColor”, “0xEBEBEB”);
myTree.setStyle(”borderStyle”, “none”);
myTree.setStyle(”color”, “0×666666″);
myTree.setStyle(”rollOverColor”, “0xE3E3E3″);
myTree.setStyle(”selectionColor”, “0xE3E3E3″);
myTree.setStyle(”textRollOverColor”, “0×666666″);
myTree.setStyle(”textSelectedColor”, “0×666666″);

If you want to customize the icons in your tree component you can by creating your own icon. Convert your icon to a movie clip symbol and it’s important that you give it a unique Linkage Identifier name. You can do this by clicking on the Advanced button in the Symbol Properties box. If you don’t you will not be able to customize the look of your icons. These are the 5 icons you can customize.

myTree.setStyle(”defaultLeafIcon”, “LinkageIdentiferName”);
myTree.setStyle(”folderClosedIcon”, “LinkageIdentiferName”);
myTree.setStyle(”folderOpenIcon”, “LinkageIdentiferName”);
myTree.setStyle(”disclosureOpenIcon”, “LinkageIdentiferName”);
myTree.setStyle(”disclosureClosedIcon”, “LinkageIdentiferName”);

For more infomation on customizing the tree component in flash click here.

Related Flex Tutorials