包 | flash.net |
类 | public class Responder |
继承 | Responder ![]() |
语言版本 : | ActionScript 3.0 |
Player 版本 : | Flash Player 9 |
NetConnection.call()
中使用以处理来自与特定操作成功或失败相关的服务器的返回值。 在使用 NetConnection.call()
时,您可能会遇到特定于当前操作的网络操作错误或与当前连接状态有关的错误。 操作错误以 Responder 对象(而不是 NetConnection 对象)为目标,便于进行错误处理。
另请参见
方法 | 定义方 | ||
---|---|---|---|
创建一个新的 Responder 对象。
| Responder | ||
![]() |
指示对象是否已经定义了指定的属性。
| Object | |
![]() |
指示 Object 类的实例是否在指定为参数的对象的原型链中。
| Object | |
![]() |
指示指定的属性是否存在、是否可枚举。
| Object | |
![]() |
设置循环操作动态属性的可用性。
| Object | |
![]() |
返回指定对象的字符串表示形式。
| Object | |
![]() |
返回指定对象的原始值。
| Object |
Responder | () | 构造函数 |
public function Responder(result:Function, status:Function = null)
语言版本 : | ActionScript 3.0 |
Player 版本 : | Flash Player 9 |
创建一个新的 Responder 对象。 可以将 Responder 对象传递给 NetConnection.call()
,以处理来自服务器的返回值。 可以为两个参数之一或两个参数都传递 null
。
result:Function — 如果对服务器的调用成功并返回结果,则此函数被调用。
|
|
status:Function (default = null ) — 如果服务器返回一个错误,则此函数被调用。
|
当前页: http://livedocs.adobe.com/flash/9.0_cn/ActionScriptLangRefV3/flash/net/Responder.html