flexµ÷ÓÃas2µÄswf
ÓÉÓÚavm°æ±¾µÄÎÊÌ⣬flex3ÎÞ·¨Ö±½Óµ÷ÓÃflash×öµÄswfÎļþ£¬ÅªÁËÒ»Ì죬×îºóÖÕÓÚÏëµ½ÁËÒ»¸ö°ì·¨£¬½«LocalConnectºÍflexµ÷ÓÃas3Á½ÖÖ·½Ê½ÔÜÔÚÁËÒ»Æð£¬ËãÊÇÔÝʱ°ÑÕâ¸öÎÊÌâ½â¾öÁË£¡
´æÆðÀ´£¬Áô×ÅÒÔºóÐÞ¸Ä
µÚÒ»²½£ºÓÃflash×öÒ»¸öas2µÄÎļþ
ÎÒÔÚÀïÃæÌí¼ÓÁËÒ»¸ö°´Å¥
ÔÚµÚһ֡дÏÂÃæµÄ´úÂë
mybtn.onRelease=function()
{
var caller:LocalConnection=new LocalConnection();
caller.send("as_server","testAs3",this._name);//this._nameΪµÚ¶þ²½Öд´½¨µÄswfÀïtestAs3µÄ²ÎÊý
}
µÚ¶þ²½£º´´½¨Ò»¸öflash×öµÄas3µÄÎļþ£¬°üº¬Ò»¸öÃûΪlabµÄlabel
Ìí¼ÓÏÂÃæµÄ´úÂë
var server:LocalConnection = new LocalConnection();
server.connect("as_server");
server.client = this;
function testAs3(msg:String):void{
lab.text=msg;
app.appshowtext(lab.text);
}
var app:Object;
function swfshowtext(str:String):void{
lab.text=str;
}
function setApp(ap:Object):void{
this.app=ap;
}
function testAs31(msg:String,str:String):void{
lab.text=msg+str;
app.appshowtext(lab.text);
}
µÚÈý²½£ºÐ´flex´úÂë
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function onSwfLoaded(event:Event):void{
Object(myloader.content).setApp(this);
}
//×¼±¸¸øswfµ÷Óõķ½·¨
public function appshowtext(str:String):void{
textinput.text=str;
}
]]>
</mx:Script>
<mx:SWFLoader id="myloade" source="../daohang.swf" autoLoad="true" scaleContent="false"/>
<mx:TextInput id="textinput"/>
<mx:SWFLoader id="myloader" source="../demo1.swf" creationComplete="onSwfLoaded(event)" autoLoad="true" scaleContent="false" width="370" height="168"/>
<mx:Button label="send to local.swf" click="Object(myloader.content).swfshowtext(textinput.text);"/>
</mx:Application>
ÔËÐÐһϣ¬ok£¡£¡£¡
Ïà¹ØÎĵµ£º
flexºÍspring+hibernateÕûºÏÍê³Éºóweb.XML³öÏÖÈçÏ´íÎó
The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,reso ......
ת£ºhttp://www.k-zone.cn/zblog/post/flex-flash-player-gc.html
Flex±à³Ì×¢ÒâÖ®ÐÔÄÜÓÅ»¯¡¢À¬»ø»ØÊÕµÄһЩ×ܽá
×Ô´Ó¿ªÊ¼×öFlex¡¢ActionScript 3.0µÄÏîÄ¿£¬ÎÒ¾ÍÒ»Ö±ÓëÀ¬»ø»ØÊÕ¡¢ÐÔÄÜÓÅ»¯ÕâЩÎÊÌâ´ò½»µÀ£¬Òò´ËÒ²×ܽáÁËһЩÓÅ»¯µÄ·½°¸£¬Í¬Ê±ÔÚһЩQQȺÖÐÒ²µÃµ½ÁËһЩ“¸ßÈË”µÄÖ¸µã£¬Òò´Ë½«´ËÄÚÈݼǼһÏ¡£
ÒÔÏ ......
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Alert control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script& ......
Flexʼþ»úÖÆÊǹ۲ìÕßģʽ£¬¼´Ê×ÏÈҪע²áʼþ£¬Ê¼þ·Ö·¢ºóͨ¹ýʼþÏìÓ¦º¯Êý½øÐд¦Àí¡£
ÀýÈçÔÚAS3ÖУº
button.addEventListener(¡°click¡±,onClick);//Ïòbutton×¢²áÒ»¸öclickʼþ
internal function onClick(evt:MouseEvent):void{txt.text=¡°click a button!¡±;}//ʼþÏìÓ¦º¯Êý ÄÇôע²áʼþ×¢²áʲôÄØ£¿Í¨ ......