醒着☆☆

H5 Laya Native Game

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

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;
    }

}

 

posted on 2014-04-26 17:17  醒着/☆☆  阅读(158)  评论(0编辑  收藏  举报