Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÈçºÎÈ¡ä¯ÀÀÆ÷µØÖ·À¸ÖеÄÓòÃûÐÅÏ¢£¿

ÓÃFLEXÈçºÎÈ¡ä¯ÀÀÆ÷µØÖ·À¸ÖеÄÓòÃûÐÅÏ¢£¿ÎÒ²éÕÒµ½Á½ÖÖ·½·¨£º
µÚÒ»ÖÖ·½·¨ÊÇÓÃExternalInterface.call('window.location.href.toString')£¬ËüµÄÖµ¾ÍÊǵØÖ·À¸ÖеÄÓòÃû
ÓÐÒÔϼ¸µãÐèҪעÒ⣺
1.µ±FlashºÍ¼ÓÔØËüµÄÍøÒ³²»Í¬Óòʱ£¬ÐèÒªÔÚÍøÒ³ÔÚ PARAM »ò EMBED ±êÇ©ÖнøÐÐÉèÖÃAllowScriptAccess Ϊ“always”
¹ØÓÚ ......

FlexÓë.NET»¥²Ù×÷ϵÁÐÎÄÕÂĿ¼

  ±¾ÏµÁÐÎÄÕÂÖ÷Òª½éÉÜÁ˹ØÓÚFlexÓë.NET½áºÏ¿ª·¢ÖеÄһЩ»¥²Ù×÷ÐÔ£¬°üÀ¨ÍøÂçͨÐÅ¡¢Êý¾Ý¼ÓÔØ¡¢Êý¾Ý´«Êä¡¢Îļþ´«Êä¡¢ÒÔ¼°Ó¦ÓÃÓÚFlexÓë.NETЭ×÷¿ª·¢µÄͨÐÅÍø¹Ø¿ªÔ´ÏîÄ¿FluorineFxµÄÏà¹Ø֪ʶµã¡£
     ¿ªÔ´ÏîÄ¿FluorineFx¾ÍÊÇרÃÅÕë¶Ô.NETƽ̨ÓëFlexͨÐÅÌṩµÄAMFЭÒéͨÐÅÍø¹Ø£¬ÎÒÃÇ¿ÉÒÔͨ¹ ......

FLEX moduleµÄʹÓÃ

ÓÃFLEXÀ´¿ª·¢Ó¦ÓÃÄÑÃâ²»ÁËҪʹÓõ½Module£¬FLEX×é¼þÌṩÁËModuleLoader×é¼þ£¬¸Ã×é¼þʹÓ÷½Ê½ÀàËÆÓëswfLoader£¬µ«ÊÇͨ³£½ö½öʹÓøÃ×é¼þ²¢²»ÄÜÂú×ãÎÒÃǵÄÐèÇó£¬ÕâʱFLEXΪÎÒÃÇÌṩÁËModuleManager£¬¿ÉÒÔʵÏÖ¶¯Ì¬µÄÔØÈ벻ͬµÄÄ£¿é¡£
module·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇÍêÕûµÄ£¬Ò»ÖÖÊǹØÁªµ½Ö÷³ÌÐòµÄ£¬ÔÚн¨Moduleʱ¿ÉÒÔÑ¡Ôñmodule swf s ......

flexʵÏÖ¶ÁÈ¡±¾µØÎļþ

import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
private var loader:URLLoader = new URLLoader();
private var request:URLRequest = new URLRequest("a.txt");
       
private function initComplete():void
   {
   ......

¹ØÓÚflex¶ÁÈ¡±¾µØÎļþµÄÎÊÌâ

FLEX±àÒëµÄSWFÎļþ£¬Ö»ÄÜÑ¡Ôñ·ÃÎʱ¾µØÎļþ»ò·ÃÎÊÍøÂçÎļþ£¬¶þÕßÖ»ÄÜÈ¡Ò»£¨àÅ£¬ÎªÊ²Ã´£¿ÎÒÒ²²»ÖªµÀ£¬¹Ù·½ËµÊÇΪÁË°²È«¿¼ÂÇ£©£¬¶øFLEX±àÒëµÄĬÈÏÑ¡ÏîÊÇÖ»ÄÜ·ÃÎÊÍøÂçÎļþ£¬ËùÒÔÄ㽫binÀïµÄ¶«Î÷COPYµ½ÆäËûµØ·½¾Í²»ÄܶÁÈ¡ÁË¡£¶øÄãÔÚĬÈϵÄbinĿ¼Ï¿ÉÒÔ¶ÁÈ¡µÃµ½£¬ÊÇÒòΪFLEXÈÏΪÄãÊÇÔÚIDE»·¾³ÖÖ£¬ÕâʱÊÇûÓÐÕâ¸öËùνµÄ°²È«ÏÞÖÆµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ