Flex组件参考 代码参考汇总

时间:2023-03-10 06:01:07
Flex组件参考 代码参考汇总

1:tourdeflex快速熟悉各种组件用法的参考
http://www.adobe.com/devnet/flex/tourdeflex.html
在线:http://www.adobe.com/devnet-apps/flex/tourdeflex/web/

Tree
  flex tree更换图标:iconFunction属性
  <mx:Tree id="resTree" labelField="@name" showRoot="false" iconFunction="setIcon"/>

[Bindable]
[Embed(source="assetes/icon/comp/HScrollBar.png")]
private var HScrollBarCls:Class
[Bindable]
[Embed(source="assetes/icon/comp/assetsPack.png")]
private var assPackCls:Class
private function setIcon(item:Object):*
{
var xml:XML = item as XML;
if (xml.hasComplexContent())
{
//如果是包 返回文件夹的图片
return assPackCls;
}
else
{
var key:String = xml. @ name;
var vo:ExtendFileVO = ExtendsNameParse.getExtendVOByName(key);
var cls:Class = _map.getValue(vo.icon);
return cls;
} }

相关文章