易截截图软件、单文件、免安装、纯绿色、仅160KB

关于flex中tree的事件,展开事件

(1)tree点击事件public function handleList(ev:ResultEvent)
{
sourceList=ev.result as ArrayCollection;
}
private function tree_itemClick(evt:ListEvent):void {
var item:Object = Tree(evt.currentTarget).selectedItem;
if (pmtree.dataDescriptor.isBranch(item)) {
pmtree.expandItem(item, !pmtree.isItemOpen(item), true);
}
Alert.show(item["id"].toString());
}

 
(2) 自动展开
Tree. openItems=数据源;  即可
(3) Flex中如何利用dataDescriptor和labelFunction属性,以及hasChildren()和getChildren()函数设置Tree中包含子节点个数。1. <?xml version="1.0" encoding="utf-8"?>
2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
3. layout="vertical"
4. verticalAlign="middle"
5. backgroundColor="white">
6.
7. <mx:Script>
8. <!--[CDATA[
9. private function tree_labelFunc(item:XML):String {
10. var label:String = item.@label;
11. if (tree.dataDescriptor.hasChildren(item)) {
12. label += " (" + tree.dataDescriptor.getChildren(item).length + ")";
13. }
14. return label;
15. }
16. ]]-->
17. </mx:Script>
18.
19. <mx:XML id="treeDP">
20. <root>
21. <node label="i) One" />
22. <node label="i) Two" />
23. <node label="i) Three" />
24. <node label="i) Four">
25. <node label="ii) One" />
26. <node label="ii) Two" />
27. <node label="ii) Three">
28. <node label="iii) One" />
29. <node label="iii) Two" />
30. </node>
31. <node label="ii) Four" />
32. </node>
33.


相关文档:

Flex Builder 3.0正式版+破解补丁


 Flex Builder 3.0正式版:
http://download.macromedia.com/pub/flex/flex_builder/FB3_win.exe

http://www.adobe.com/cfusion/tdrc/index.cfm?product=flex

http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
AIR1.0 正式版:
http://airdownload.adobe.com/air ... ob ......

eclipse安装flex插件

1.下载eclipse的插件包:FB3_WWEJ_Plugin.exe
地址:http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
2.在任意目录建一个以下结构的目录:flex_plugin->eclipse->plugins和features
3.进入Flex Builder 3 的安装目录 将plugins目录下所有以 com.adobe 开头的文件或文件夹copy到上 ......

一些FLEX的资料网站.

一、国外站点
1.资源 类
Adobe Flex 2 Component Explorer : 官方的,展示了各种组件 的用法 ,入门 必看。
CFlex :很好的一个Flex资源站点,包括教程 ,新闻,资源站点…… 只是页面有点杂乱,大家一般看右边那一栏就行了。
FlexBox :一个收集 了网上很多开源 组件的站点,是进阶学习 的好帮手。
Flex ......

避免Flex RSL重复load 提高module加载性能

本文编译后的补丁下载链接 http://download.csdn.net/source/1908278
多模块应用,每加载一个模块都会重复加载模块所使用的RSL,现在增加一个
    
    private static var  loadedRSLs:Dictionary = new Dictionary(); 来保存是否已加载
mx.core.RSLListLoader
//////////////// ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号