Fluorine是与AmfPHP、OpenAmf类似的但是用于.net平台的开源AMF网关。可以应用在Flex2与.net(1.1与2.0,3.5)中。
通过使用Fluorine可以在Flex,flash中直接调用.net程序中类的相应方法,并且完成了Class Mapping。也就是说可以传递一个复杂对象作为参数。
首先先从官网http://www.fluorinefx.com/下载安裝.
安裝完成后,打开vs2005,新建网站就多了一个fluorinefx的套件可以选择。
fluorinefx的网站会加入加入这些DLL文件
最
简单的hello world:
- using System;
- using System.Data;
- using System.Configuration;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using FluorineFx;
- using FluorineFx.AMF3;
- /// <summary>
- /// FlashRemoting 的摘要描述
- /// </summary>
- [RemotingService("")]
- public class FlashRemoting
- {
- public FlashRemoting()
- {
- //
- //
- //
- }
- public string Echo(string text)
- {
- return "FlashRemoting Gateway hello world: " + text;
- }
- }
打开fluorinefx提供的console.aspx來测试
然后用flash写个as3代码测试,OK.