按照网上的例子,做了一个初步的测试.配置如下:
建立文件夹:fr
把flash remoting虚拟目录下的gateway.aspx和web.config 复制到fr目录下
在fr目录下建立bin文件夹
把flash remoting虚拟目录下的bin里面的flashgateway.dll和frconfig.txt 复制到fr\bin下面
在IIS中建立虚拟目录...
建立test1.aspx的代码如下:
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
然后建立test.swf,建立一个textinput,名字为msg_text,然后编写AS代码,如下:
import mx.remoting.Service;
import mx.rpc.FaultEvent;
import mx.remoting.PendingCall;
import mx.rpc.ResultEvent;
import mx.rpc.RelayResponder;
var myService:Service = new Service("http://localhost/fr/gateway.aspx",null,"fr",null,null);
var pc:PendingCall = myService.fuck();
pc.responder = new RelayResponder(this, "getdata_Result","getdata_Fault");
function getdata_Result(re:ResultEvent)
{
trace(re.result);
msg_text.text = re.result;
}
function getdata_Fault(fa:FaultEvent)
{
trace("error");
msg_text.text = fa.fault.faultstring;
}
然后IE中输入http://localhost/fr/test.swf,显示正确...
但是在IE中输入http://IP地址/fr/test.swf却无法显示...
有人遇到过这问题吗?