我可以使用setStyle修改mx.controls.Tree组件的图标
tree.setStyle("disclosureOpenIcon",myIcon1);
tree.setStyle("disclosureClosedIcon",myIcon2);
tree.setStyle("folderClosedIcon",myIcon3);
tree.setStyle("folderOpenIcon",myIcon4);
tree.setStyle("defaultLeafIcon",myIcon5);
myIconx的类是"class",它是嵌入图像。但我需要自定义图标,图标应该使用actionscript绘制的方式,我们可以使用从sprite/uiccomponent扩展的组件来显示actionscript绘图。但是我们如何将它用作树的图标呢?
制作自定义项渲染器,阅读文档http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/treeClasses/TreeItemRenderer.html,