易截截图软件、单文件、免安装、纯绿色、仅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通信篇——真 组合键

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

as\flex 中添加事件addEventListener()时传递参数

/**
* @author:ycccc8202
* @用途:注册事件进行传递参数的代理类
* @date:2007.8.26
* @example:
* import com.ycccc.utils.JEventDelegate
stage.addEventListener(MouseEvent.MOUSE_DOWN,JEventDelegate.create(mouseDownHandler,"a","b"));
function mouseDownHandler(e:MouseEvent,...arg) {
trace(e)
......

Flex Netbeans 开发环境环境搭建

1.下载安装netbeans6(我的版本是6.7.1)
2.下载Flex Sdk 3 ,将其解压到指定的一个目录。http://www.adobe.com/cfusion/search/index.cfm?loc=en_us&term=flex+sdk&siteSection=cfusion%3Atdrc
3.下载netbeans的flex插件 http://sourceforge.net/projects/flexbean/files/
4.netbeans配置Flex插件,配置成 ......

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号