加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

FluorineFx:实现Flex与ASP.NET的协同开发之组件库

发布时间:2020-12-15 04:47:59 所属栏目:百科 来源:网络整理
导读:参考资料: Flex和.NET协同开发利器FluorineFx Flex 数据交互的三种方式(WebService、HttpService、Remoting) Flex与ASP.NET通过Remoting方式进行通讯 (使用第三方组件 RemoteObjectAMF0 实现AMF网关通信) 用FluorineFx库实现Silverlight远程过程调用 注意
参考资料:
  
  
  • Flex和.NET协同开发利器FluorineFx
  • Flex 数据交互的三种方式(WebService、HttpService、Remoting)
  • Flex与ASP.NET通过Remoting方式进行通讯 (使用第三方组件 RemoteObjectAMF0 实现AMF网关通信)
  • 用FluorineFx库实现Silverlight远程过程调用

注意事项:

1.Flex 3必须指定 services-config.xml

(主要是为了找到 remoting-config.xml 中的 <destination /> 的id)

方法一:Project Properties > Flex Compiler > Additional compiler arguments:
? ? ? ? -locale en_US -services "x:...FlexWebSiteWEB-INFflexservices-config.xml"
? ? ? ? 或使用相对路径 "....WEB-INFflexservices-config.xml"
方法二:直接在Flex3 > .actionScriptProperties 文件中设置
? ? ? ?<compiler additionalCompilerArguments=
? ? ? ? "-locale en_US -services &quot;....WEB-INFflexservices-config.xml&quot;" .../>

2. 其余信息可在 Flex3 > .flexProperties 中设置

? ? ? ? <flexProperties aspUseIIS="true" flexServerType="32"?
? ? ? ? ? ? ? ? ? serverContextRoot="/FlexWebSite"?
? ? ? ? ? ? ? ? ? serverRoot="H:/.../FlexWebSite"?
? ? ? ? ? ? ? ? ? serverRootURL="http://localhost:4776/FlexWebSite/"?
? ? ? ? ? ? ? ? ? toolCompile="true" useServerFlexSDK="false" version="1"/>

3.Flex3与ASP.NET 中?<destination id="fluorine"> 的AMF 网关通信

  • ? ? 可使用第三方actionscript库?RemoteObjectAMF0 实现
  • ? ? 使用 <mx:RemoteObject />
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
	  <mx:RemoteObject id="service" destination="fluorine"
          source="ServiceLibrary.Sample">
              <mx:method name="Echo" result="onResult(event)">
              </mx:method>
      </mx:RemoteObject>
            <mx:Script>
         <![CDATA[
             import mx.rpc.events.ResultEvent;
             internal function onClick():void
             {
                 service.Echo(txtInput.text);
             }
             
             internal function onResult(evt:ResultEvent):void
             {
                 txtResult.text = evt.result.toString();
             }
         ]]>
     </mx:Script>
     
     <mx:Panel x="53" y="52" width="250" height="200" layout="absolute" title="测试FluorineFx" fontSize="12">
         <mx:TextInput x="35" y="21" id="txtInput"/>
         <mx:Button x="35" y="63" label="确 定" fontWeight="normal" click="onClick()"/>
         <mx:Label x="35" y="95" text="结 果:"/>
         <mx:TextInput x="35" y="123" width="160" id="txtResult"/>
     </mx:Panel>
     
</mx:Application>


  • ? ? 待续。。。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读