易截截图软件、单文件、免安装、纯绿色、仅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嵌入到html和html嵌入到flex

flex嵌入到html:
  用swfobject,下载的.js地址:http://www.adobe.com/devnet/activecontent/articles/devletter.html
在你的 HTML 页面头部<head>区嵌入这个脚本文件:<script type="text/javascript" src="swfobject.js"></script>
在你的 HTML 中写一个用来放 Flash 的容器,比如<div> ......

flex竖直折线图

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

flex图表渐变效果示例

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

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特效

这里面有许多特效很酷,希望对大家有帮助。 1.旋转 效果:http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube/ 代码:http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects.zip
2.画布按钮 http://dougmccune.com/blog/2007/06/01/new-component-canvasbutton-added-to-flexlib/ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号