FLEXºÏ²¢Êý×é
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script><!--[CDATA[import mx.collections.ArrayCollection;
public var a1:ArrayCollection = new ArrayCollection ([{ Region:"Region1",Territory:"Territory1",Territory_Rep:"Territory_Rep1",Actual:11,Estimate:111}]);
public var a2:ArrayCollection = new ArrayCollection ([{ Region:"Region2",Territory:"Territory2",Territory_Rep:"Territory_Rep2",Actual:22,Estimate:222}]);
public var a3:ArrayCollection = new ArrayCollection ([{ Region:"Region3",Territory:"Territory3",Territory_Rep:"Territory_Rep3",Actual:33,Estimate:333}]);
public var a4:ArrayCollection = new ArrayCollection ([{ Region:"Region4",Territory:"Territory4",Territory_Rep:"Territory_Rep4",Actual:44,Estimate:444}]);
public var a5:ArrayCollection = new ArrayCollection ([{ Region:"Region5",Territory:"Territory5",Territory_Rep:"Territory_Rep5",Actual:55,Estimate:555}]);
public var dpFlat:ArrayCollection=new ArrayCollection(a1.toArray().concat(a2.toArray().concat(a3.toArray()).concat(a4.toArray()).concat(a5.toArray())))
import mx.events.ItemClickEvent;
private function Switch(event:ItemClickEvent):void {var keycode:int=event.index;
switch(keycode){//ÉÏÏÂ×óÓÒcase 0:grid.dataProvider=a1;break;case 1:
grid.dataProvider=a2;break;case 2:grid.dataProvider=a3;break;case 3:
grid.dataProvider=a4;break;case 4:grid.dataProvider=a5;break;case 5:
grid.dataProvider=dpFlat;break;}}]]--></mx:Script><mx:Panel
layout="absolute"title="Êý¾ÝºÏ²¢"horizontalCenter="0"
verticalCenter="0" height="220" width="500">
<mx:DataGrid id="grid" dataProvider="{a1}" right="0" bottom="0" top="0" left="0"/>
<mx:ControlBar horizontalAlign="right" ><mx:Spacer width="10%"/>
<mx:ToggleButtonBaritemClick="Switch(event);"bottom="2" id="ToggleButtonBar"
horizontalCenter="0"><mx:dataProvider><mx:Array>
<mx:String>µÚÒ»</mx:String><mx:String&
Ïà¹ØÎĵµ£º
×î½üÓöµ½Á˺ͱðÈË·ÖÏíijЩģ¿é´úÂëµÄÇé¿ö£¬Òò´ËÏëµ½ÁËflex lib project,½á¹ûÈçÏ£º
Ê×ÏÈ£¬ÔÚ¿´ºÜ¶àÎÄÕÂÖйØÓÚswcµÄ½éÉÜʱ£¬¶¼»ù±¾Ëµ³ÉÊÇÓÃÓÚflexµÄ component»òÕßassetsµÄ´ò°üÎļþ¡£ÀàËÆÓÚjava µÄjar°ü¡£µ±Ê±¾ÍºÜÆæ ¹Ö£¬ÄѵÀËûÖ»ÄÜÔÚflex projectÖÐʹÓã¿ÓÚÊÇ×öÁËÈçϲâÊÔ£º
......
<?
xml
version
=
"1.0"
?>
<!-- Simple example to demonstrate the Alert control. -->
<
mx:Application
xmlns:mx
=
"http://www.adobe.com/2006/mxml"
>
&n ......
½ñÌìÓöµ½µÄÒ»¸öÎÊÌ⣬¶ÁÈ¡ÍøÕ¾ÉϵÄÒ»¸öXMLÎļþ±»¾Ü¾ø£¬´íÎóÃèÊöÈçÏ£º
*** °²È«É³Ïä³åÍ» ***
µ½127.0.0.1:8080µÄÁ¬½ÓÒÑÍ£Ö¹ - ²»ÔÊÐí´Ód:/flex/work/bin_debug/work.swf½øÐÐÁ¬½Ó
´íÎ󣺾ܾøÇëÇóλÓÚ http://127.0.0.1:8080/php/work.xml µÄ×ÊÔ´£¨ÇëÇóÕß´Ód:/flex/work/bin_debug/work.swf·¢³öÇëÇ󣩣¬ÔÒòÊÇȱ·¦²ß ......
ÏëÔÚflexÖÐÕæʵµÄÏÔʾhtml,µ«ÊÇtexteara,lable,textÖÐÖ»Ö§³Ö²¿·Öhtml±êÇ©
<a>¡¢<b>¡¢<br>¡¢<font>¡¢<img>Èç¹ûÓÃimgÓÖ´æÔÚÏÔʾ×Ô¶¯»»ÐеÄÎÊÌâ¡£Ö»ÓвÉÓÃǶÈëhtmlµÄ·½·¨À´½â¾ö¡£
1.flexdemo1
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe ......