FlexͨÐÅÆª——FlexºÍÍⲿ½øÐÐÒ첽ͨÐÅ
ExternalInterface.callµÄÎÊÌâ
ÇëÁôÒâÒÔÏÂÇé¾°£¬ÒªÀûÓÃÍⲿӦÓóÌÐòµ¯³öÎļþÑ¡Ôñ´°Ì壬²¢·µ»ØËùÑ¡µÄÎļþ·¾¶¡£
ʹÓÃExternalInterface.callÀ´ÊµÏÖ£¬µ±Óû§60Ãë(FlexÒѾÉèÖÃ×µÄµÈ´ýʱ¼ä)ÄÚδÄܹ»Íê³ÉÎļþÑ¡Ôñ»áµ¯³ö"1502"µÄ´íÎó£¬ÑÏÖØÓ°ÏìÓû§ÌåÏÖ¡£
ËùÒÔ£¬Ò»Ð©±È½ÏºÄʱµÄ²Ù×÷(³¬¹ý60s)£¬»òÎÞ·¨È·¶¨ºÎʱµ÷ÓÃÍê³ÉµÄ·½·¨(ÈçÉÏÊö)£¬Ó¦¸ÃʹÓÃÒì²½µ÷Óõķ½Ê½£¬µ±·½·¨Ö´ÐÐÍê³Éºó½øÐлص÷¡£
<![CDATA[
ʵÏÖÒì²½µ÷ÓûúÖÆ
Flex¶Ë
¶¨ÒåÒ»¸öDictionary£¬ÓÃÀ´»º´æ»Øµ÷µÄ·½·¨
private
var m_AsyncDict:Dictionary;
¶¨ÒåOpenFileDialogAsync·½·¨£¬ÓÃfscommandÀ´ÊµÏÖ£¬fscommandÊǵ¥ÏòµÄµ÷Ó㬲»´æÔÚ60Ã볬ʱµÄÎÊÌâ¡£
//µ¯³ö´ò¿ªÎļþ´°¿Ú£¬Ñ¡Ôñµ¥¸öÎļþ
public
function OpenFileDialogAsync(title:String = "ÇëÑ¡Ôñ1¸öÎļþ", initFolder:String = "", filter:String = "", callbackString:Function = null):void
{
//´´½¨Òì²½ID
var id:String = mx.utils.UIDUtil.createUID();
//´´½¨×Ô¶¨ÒåÒì²½ÇëÇó
var request:String = "<args>";
request += "<arg>" + id + "</arg>";
request += "<arg>" + title + "</arg>";
request += "<arg>" + initFolder + "</arg>";
request += "<arg>" + filter + "</arg>";
request += "</args>";
//»º´æ»Øµ÷·½·¨
if (callbackString != null)
m_AsyncDict[id] = callbackString;
flash.system.fscommand(FLASH_TO_APP_OPEN_FILE_DIALOG_ASYNC, request);
}
¶¨Òå²¢×¢²áAsyncCallbackºÍCancelAsyncCall·½·¨£¬ÈÃÍⲿӦÓóÌÐòÄܹ»ÏìÓ¦Òì²½»Øµ÷»òÈ¡ÏûÒì²½»Øµ÷¡£
public
function AsyncCallback(id:String, value:Object):void
{
if (m_AsyncDict[id])
{
//Ö´Ðлص÷·½·¨
Ïà¹ØÎĵµ£º
×¢Ò⣺±¾»ú±ØÐëÁ¬½Ó»¥ÁªÍø
Ч¹ûͼ£º
Ô´ÂëÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" creationComplete="init()">
<mx:Panel width="620" height="455" layout="absolute" title="ÌìÆøÔ¤±¨" fontSize="12">
......
¸ÅÊö
ÓÎÏ·¿ª·¢ÊǸöºÜ´óµÄ¿ÎÌ⣬¸ÃϵÁÐÖ»¼òµ¥½²ÊöÈçºÎʹÓÃFlex¼¼Êõƽ̨´î½¨Ò»¸ö¼òµ¥µÄÓÎÏ·¿ò¼Ü£¬ÈçºÎÉè¼ÆÄÜÓÅ»¯ÓÎÏ·µÄCPUÕ¼Óã¬ÄÚ´æµÈ£¬×îºóÖÆ×÷Ò»¸öÍêÕûµÄFlexСÓÎÏ·(ÌṩԴÂë)¡£
ÓÎÏ·µÄ³ÊÏÖ
·½Ê½1£ºÔª¼þ·½Ê½
ÕâÖÖ·½Ê½±È½ÏÊʺÏСÐ͵ÄÓÎÏ·£¬ÓÎÏ·Ôª¼þÊýÁ¿ÉÙµÄÇé¿ö¡£µ±ÓÎÏ·Ôª¼þÊýÁ¿´óʱ¾Í²»ºÏÊÊÁË£ºÔª¼þ»á¶ÔÓÎϷͼÐΡ¢ÒôÆ ......
Æäʵһ°ãµÄÇé¿öÏÂÊDz»»áÓõ½ÕâÖÖÇé¿öµÄ£¬Ò»°ãÔÚ³ÌÐòÀ±ÈÈçÑ¡ÖÐÒªÌîдµÄÏîÄ¿£¬¶¼Ï²»¶ÓÐÒ»¸öÑ¡ÖеÄ״̬£¬µ«ÊÇÏÖÔÚÎÒÃÇÀ´¸ö·´ÆäµÀ¶øÐÐ,Èç¹ûÎÒ²»ÏëÒªÕâ¸ö״̬¸ÃÔõô°ìÄØ?
²Î¿¼ÁËЩ×ÊÁÏ,ÆäʵҲ¼òµ¥,Óкü¸ÖÖ·½·¨£¬µ«ÊÇ·¢ÏÖÁËÒ»¸ö×îÓÐÓõķ½·¨,Ê×ÏÈÎÒÃÇÔÚÎę̀ÉÏËæÒâ·Å¼¸¸öTEXTINPUT ......
ÎʸöÎÊÌâ ×î½üÔÚѧϰFlex¡£¡£¡£ÕÕ×ÅÍøÉÏ×ÊÁÏ£¬ÔÚMyEclipseÖÐÍê³ÉÁËFlexÓëwebÏîÄ¿ÕûºÏ
ÔÚ×öÆÕͨFlexÔËÐвâÊÔÊÇÊÇûÓÐÎÊÌâµÄ£¬µ«Èç¹ûÏëµ÷ÓÃjavaÀ࣬°´ÕÕÍøÉϵÄ×ö·¨£¬ÊÇÒª¸ü¸Ä¸ÃÄ¿
¼ÏµÄremoting-config.xml£¬µ«ÊÇÎÒ×Ô¶¯Éú³ÉµÄWebRoot/WEB_INFO/flexĿ¼ÏÂÃæ½ö½öÖ»ÓÐ
services-config.xmlÒ»¸öÎļþ£¬ÕâÊÇʲôÔÒò£¿£¿ÎÒµÄÊÇ ......
ÎÊÌâÃèÊö£º
ÊäÈëÒ»¸öÊý£¬È»ºó°´Ä³¸öÔËËã·û£¬ÔÙÊäÈëÁíÒ»¸öÊý£¬°´µÈºÅ¼´¿ÉµÃ³ö½á¹û¡£Ö»°´ÕÕÊäÈë˳Ðò¼ÆËã½á¹û£¬¶ø·Ç°´ÕÕÔËËã·ûÓÅÏȼ¶À´µÃ³ö½á¹û£¬¼´£¬Èç¹û°´Ë³ÐòÊäÈë2+8*3£½»áµÃµ½30£¬¶ø·Ç26.
Ëã·¨ÃèÊö£º
¶¨ÒåÈý¸öÈ«¾Ö±äÁ¿£¬·Ö±ðÊÇfirst£¨Number£©£¬ second£¨Number£©£¬ symbol£¨String£©
first´ú±í¶þÄ¿ÔËËãÖеÚÒ»¸öÊý£¬se ......