当前位置: 首页 > 图文教程 > Flash动画 > Flash动画制作 > NetConnection.Connect的几种错误

Flash动画制作
28个有趣的loading的flash网站实例
Flash实例教程:跟随鼠标的炫舞线条特效
Flash CS3教程:烟雾状动画制作技巧
Flash CS4的Deco工具制作有图案的水晶球
Flash CS4的骨骼工具制作皮影动画技巧
Flash实例教程:好看的气泡动画特效
Flash AS3.0教程:好看的荷塘涟漪动画
设置TextField的插入点(尖号)的位置
24个相当漂亮的创意类Flash网站设计实例
学习ActionScript 3.0比较重要的6个好处
AS3 socket解码设计时忽略的问题
Flash实例教程:好看的星光四射动画特效
Flash实例教程:简单的鼠标翻扑克动画
Flash AS实例教程:会眨眼的美女
Flash AS制作创意的鼠标经过的网页导航
AS使用经验总结:AS的使用技巧汇总
Flash动画技巧:图形元件相关知识
连连看小游戏地图数据简单生成的AS代码
Flash实例教程:好看的跟随鼠标的旋转星星
Flash CS4教程:立体梦幻星空旋转3D地球

Flash动画制作 中的 NetConnection.Connect的几种错误


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-30   浏览: 47 ::
收藏到网摘: n/a

本文例举了NetConnection.Connect的几种错误。

有以下这几种返回:
1、NetConnection.Call.Failed Error
NetConnection.call() 调用服务器端方法失败。返回的info对象包含一个具体的调用失败说明。for in一下可以看到。

2、NetConnection.Connect.AppShutdown Error
服务器端应用程序因为一些原因被关闭(过度占用server端资源),或者服务器已经被关闭。

3、NetConnection.Connect.Closed Status
连接中断。

4、NetConnection.Connect.Failed Error
连接失败。如FMS 没有启动。

5、NetConnection.Connect.InvalidApp Error
targetURI中rtmp://[ip或domain]/[appName]
其中appName不存在。

6、NetConnection.Connect.Rejected Error
连接被拒绝 原因:
targetURI指定的application不充许client连接,或者传递给应用程序的参数不对,也可能是server应用程序直接拒绝连接(可以在appName文件夹中写一个ASC文件做到)
这时,info对象有一个application属性,包含服务器方法application.rejectConnection()的返回值。
client在被拒绝后会马上再收到一个NetConnection.Connect.Closed的信息。

7、NetConnection.Connect.Success Status
连接成功。
当返回是NetConnection.Connect.Fail时,可以从下面几个方面思考原因:
Are you connecting to the correct server?
Is the server running?
Are you specifying the protocol (rtmp:) for connecting to the server?
If you are connecting from behind a firewall, are you specifying the correct protocol (rtmpt:)?
Attempts to connect to the server can also fail if the permissible number of socket connectionson either the client or the server computer is at its limit. This limit is ependent on how much physical memory your server has, and how busy the connections are. On Windows systems,the memory for socket connections is allocated out of the non-paged memory, so it cannot beswapped out to a page file. You may see that you reach the maximum limit at different valuesfrom time to time as other running programs (such as core operating-system services) arecompeting with your program for space in the non-paged memory pool.