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

关于flex 的几种绑定

第一种,使用{}绑定
<mx:TextInput
id=
"input"
/>
<mx:Label
text=
"{input.text}"
/>
第二种,<mx:Binding> 绑定
<mx:Application
xmlns:mx=
"http://www.adobe.com/2006/mxml"
layout=
"vertical"
>
<mx:TextInput
id=
"inputSource"
/>
<mx:Label
id=
"labelTarget"
/>
<mx:Binding
source=
"inputSource.text"
destination=
"labelTarget.text"
/>
</mx:Application>
第三种,使用 BindingUtils工具类
BindingUtils
.
bindProperty
(
target
,
"targetProperty"
,
source
,
"sourceProperty"
);
target:Object - 目标
targetProperty:目标属性,String类型
source:Object - 绑定源
sourceProperty:源属性,String类型
<mx:Application
xmlns:mx=
"http://www.adobe.com/2006/mxml"
layout=
"vertical"
>
<mx:TextInput
id=
"inputSource"
/>
<mx:Label
id=
"labelTarget"
/>
</mx:Application>
<script>

BindingUtils
.
bindProperty
(labelTarget,"text",inputSource,"text");
</script>


相关文档:

flex时序图示例

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>

import mx.collections.ArrayCollection;
......

Flex通信篇——真 组合键

<![CDATA[
Flex中的键盘事件
要在Flex中响应键盘输入,只需注册keyDown事件即可。
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" keyDown="OnKeyDown(event)">
    <mx:Script>
          ......

flex图表鼠标事件

<?xml version="1.0"?>
<!-- charts/DataPointAlert.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
import mx.controls.Alert;
import mx.charts.events.ChartItemEvent;
import mx.collections.Array ......

flex图表数据动态更新效果示例

<?xml version="1.0"?>
<!-- charts/BasicSeriesSlideEffect.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var expenses1:ArrayCollectio ......

flex 嵌入简单的html

<mx:TextArea
width=
"200"
height=
"100"
>
<mx:htmlText>
This is an example of setting a <B>
TextArea</B>
control's <I>
htmlText<I>
property.
</mx:htmlText>
</mx:TextArea>
支持的样式标记
< ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号