



























先是参照:http://bbs.blueidea.com/viewthread.php?tid=2774850
注意的是版本好像跟现在下的FluorineFx版本不一样,引用反正是不同了.
1.新建一个FluorineFx网站
2.添加一个App_code文件夹,并新建一个类文件HelloWorld.cs
![]()
1
using System;
2
using System.Data;
3
using System.Configuration;
4
using System.Web;
5
using System.Web.Security;
6
using System.Web.UI;
7
using System.Web.UI.WebControls;
8
using System.Web.UI.WebControls.WebParts;
9
using System.Web.UI.HtmlControls;
10
using FluorineFx; //这里跟论坛里的引用不一样了
11
/// <summary>
12
/// HelloWord 的摘要说明
13
/// </summary>
14
15
16
[RemotingService()] //特性 这句一定要有,要不没反应
17
18
public class HelloWorld
19
{
20
public HelloWorld()
21
{
22
23
}
24
public string Hello(string str)
25
{
26
return ".NET返回数据: " + str;
27
}
28
}
不一样的部分已经注释上了
![]()
1
package
2
{
3
import flash.display.Sprite;
4
import flash.events.*;
5
import flash.net.*;
6
7
public class Main extends Sprite
8
{
9
private var nc:NetConnection;
10
private var rs:Responder;
11
public function Main():void
12
{
13
rs = new Responder(onResult, onStatus);
14
nc = new NetConnection();
15
nc.connect("http://localhost/remoting/Gateway.aspx");
16
nc.call("HelloWord.Hello", rs, "世界人民向你问好");
17
}
18
private function onResult(value:*):void
19
{
20
trace("*****************************");
21
trace(value);
22
trace("*****************************");
23
}
24
private function onStatus(value:Object):void
25
{
26
trace("--------------------------");
27
for (var i:String in value) {
28
trace(i + ", " + value[i]);
29
}
30
31
}
32
}
33
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。