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&
相关文档:
使用flex的成本
FLex语言本身免费开源
LCDS:
做 remote object access service的,说简单点就是沟通后台java和前台flex直接的桥梁
adobe官方的东西,收费,很贵
BDS: 开源免费,基本上可以完全替代LCDS,也是adobe官方的东西,估计是LCDS没人用,他又不好意思直接免费搞出来的东西
JRUN: 应用服务器,也很 ......
方法一:
<?xml version="1.0"?>
<!-- events/MultipleEventHandlersInline.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
private function submitForm(e:Event):void {
// Handle event here.
......
<?
xml
version
=
"1.0"
?>
<!-- Simple example to demonstrate the Alert control. -->
<
mx:Application
xmlns:mx
=
"http://www.adobe.com/2006/mxml"
>
&n ......
最简单的方法是本地化编译,即编译不同的语言版本
,然后使用
Application Server
来判定客户使用的是哪种语言,并自动指向对应的
swf
文件。
具体做法如下:
在项目上点击右键,选择
Properties
。
然后选择
Flex Compiler
,在
Additional Compiler arguments
下面已经配置好语言包了,默认为
-locale en_ ......
想在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 ......