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&
Ïà¹ØÎĵµ£º
ÏÖÔÚflash builder 4ÒѾ×Ô´øÁ˶àÖÖÓïÑÔ°ü£¬ÔÚʹÓõÄʱºòÖ±½ÓÄùýÀ´ÓþͿÉÒÔÁË£¬ÔÚʹÓÃ×ÊÔ´ÎļþµÄʱºò£¬ÐèÒªÉèÖÃÒ»ÏÂ×ÊÔ´²ÎÊý
-locale=en_US,zh_CN -source-path=locale/{locale}
flex 3.xµÄ°æ±¾µÄsdkÖ»Ö§³ÖÓ¢ÎĺÍÈÕÎÄ£¬Èç¹ûÐèÒªÖÐÎÄ£¬Ôò¿ÉÒÔ´Óflex
4.xsdkµÄ\frameworks\locale¿½±´zh_CNµÈÎļþ¼Ðµ½flex3.xµÄ\frameworks ......
£¨×¢£º²ÉÓÃfb4 beta1¿ª·¢£¬ÓÉÓÚ¼æÈÝÎÊÌ⣬¿ÉÒÔÊʵ±¼ÓÒÔÐ޸ķŵ½×Ô¼ºµÄ»·¾³ÖУ¬²âÊÔµÄʱºòÐèÒª·Åµ½·þÎñÆ÷ÉÏÃæ£¬±¾È˵IJâÊÔurlΪ
http://127.0.0.1/astest/asjs.html?msnum=13112345678£©
mxmlÎļþ£º
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" creation ......
flexÖÐÔÚDisplayObjectÀïÖ±½ÓÓÃstage£¬¿ÉÄÜ»áÊÇnull£¬ÔÒò²»ÊÇÌ«Çå³þ£¬ÕÒµ½Á˽â¾ö°ì·¨£¬µ±½ÓÊÕµ½ADDED_TO_STAGEʼþʱ£¬stage¿Ï¶¨±»´´½¨³öÀ´ÁË£¬Õâ¸öʱºòÔÙʹÓþÍûÓÐÎÊÌâ¡£
addEventListener( Event.ADDED_TO_STAGE, function( e:Event ):void ??
{
stage.addEventListener(KeyboardEvent.KEY_DO ......
½ñÌìÓöµ½µÄÒ»¸öÎÊÌ⣬¶ÁÈ¡ÍøÕ¾ÉϵÄÒ»¸ö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·¢³öÇëÇ󣩣¬ÔÒòÊÇȱ·¦²ß ......