flex BindableʹÓý²½â
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="392" height="300" layout="absolute">
<mx:Label x="19" y="10" text="{user}" width="171" height="20"/>
<mx:Button x="216" y="8" label="²âÊÔBindable" click="bind()" width="105"/>
<mx:DataGrid x="19" y="58" dataProvider="{arr}">
<mx:columns>
<mx:DataGridColumn headerText="year" dataField="year"/>
<mx:DataGridColumn headerText="city" dataField="city"/>
<mx:DataGridColumn headerText="provice" dataField="provice"/>
<mx:DataGridColumn headerText="total" dataField="total"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]
private var user:String="HELLO";
[Bindable]
private var arr:ArrayCollection=new ArrayCollection([
{year:2009,city:"Shanghai",provice:"ÉϺ£",total:580000},
{year:2009,city:"Beijing",provice:"ºÓ±±Ê¡",total:7852020},
{year:2009,city:"Nanjing",provice:"½ËÕÊ¡",total:895145},
{year:2009,city:"Hangzhou",provice:"Õã½Ê¡",total:4132415}]);
//ÐÞ¸ÄÁ˰󶨵ÄuserºÍarr£¬²¢Ã»ÓÐÐÞ¸ÄlabelºÍdatagrid
private function bind():void{
this.user="HEllo22";
arr.removeItemAt(3);
}
]]>
</mx:Script>
</mx:Application>
Ïà¹ØÎĵµ£º
[Bindable]¾ÍÊÇËùνµÄÔªÊý¾Ý±êÇ©¡£ÔªÊý¾Ý±êÇ©ÊÇÒ»ÖÖÌØÊâµÄ±êÇ©£¬ËüÔÚ´úÂëÖеÄ×÷ÓþÍÊÇÏò±àÒëÆ÷ÌṩÈçºÎ±àÒë³ÌÐòµÄÐÅÏ¢¡£Êµ¼ÊÉÏ£¬ÕâЩ±êÇ©²¢Ã»Óб»±àÒëµ½Éú³ÉµÄSWFÎļþÖУ¬¶øÖ»ÊǸæËß±àÒëÆ÷ÈçºÎÉú³ÉSWFÎļþ¡£
[Bindable]
BindableÔªÊý¾Ý±êÇ©ÊÇ×î¾³£Óõ½µÄÒ»¸öÔªÊý¾Ý±êÇ©£¬ÒòΪËüʹ³ÌÐò×é¼þÖ®¼äµÄÊý¾Ýͬ²½±äµÃºÜÈÝÒס£Bin ......
ä¯ÀÀÆ÷¼ÓÔØswfºó£¬Flex×é¼þ×Ô¶¯»ñÈ¡ÊäÈë½¹µã¡£
1.ÔÚflexÖÐÉèÖý¹µã
as3 ´úÂë
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationCom ......
´úÂëÈçÏ£º
Download: main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
&nb ......
TypeError: Error #1034: 強ÖÆÐÍ変換¤Ëʧ敗¤·¤Þ¤·¤¿¡£jp.co.nec.necst.pi.ap2web::TestEvent@1645ee79 ¤ò jp.co.nec.necst.pi.ap2web.TestEvent ¤Ë変換¤Ç¤¤Þ¤»¤ó¡£
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispat ......
ÈýÄêǰ£¬ÓùýAmfPHPÓëFlash/Flex
Remoting×ö¹ý½»»¥£¬×î½ü½Ó´¥Python£¬¹«Ë¾ÏîÄ¿ÓõÄFlex×öǰ¶Ë£¬ËùÒÔ½Ó´¥ÁËPyAmf¡£PyAmf±¾ÖÊÉϸúAmfPHPÊÇÀ×ͬµÄ¡£¶¼ÊÇͨ
¹ý¶ÔAMFÐÒ飨ActionScript Message Format£©ÐÒéµÄÖ§³ÖÀ´ÊµÏÖ¶ÔFlashµÄ½»»¥¹ý³Ì¡£
Ò»¡¢Ê×ÏÈ£¬¼òµ¥µÄ½éÉÜÒ»ÏÂAMFÐÒé¸ñʽ¡£
AMFÊÇAdobe¶À¼Ò¿ª·¢³öÀ´µÄͨÐÅÐÒ飬Ëü²É ......