| window.runtime 属性 | window.runtime.flash.net.Responder |
| 继承 | Responder Object |
NetConnection.call() 中使用以处理来自与特定操作成功或失败相关的服务器的返回值。在使用 NetConnection.call() 时,您可能会遇到特定于当前操作的网络操作错误或与当前连接状态有关的错误。操作错误以 Responder 对象(而不是 NetConnection 对象)为目标,便于进行错误处理。
另请参见
| 方法 | 定义方 | ||
|---|---|---|---|
Responder(result:Function, status:Function = null)
创建一个新的 Responder 对象。 | Responder | ||
![]() | hasOwnProperty(name:String):Boolean
指示对象是否已经定义了指定的属性。 | Object | |
![]() | isPrototypeOf(theClass:Object):Boolean
指示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | |
![]() | propertyIsEnumerable(name:String):Boolean
指示指定的属性是否存在、是否可枚举。 | Object | |
![]() | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
设置循环操作动态属性的可用性。 | Object | |
![]() | toString():String
返回指定对象的字符串表示形式。 | Object | |
![]() | valueOf():Object
返回指定对象的原始值。 | Object | |
| Responder | () | 构造函数 |
function Responder(result:Function, status:Function = null)
创建一个新的 Responder 对象。可以将 Responder 对象传递给 NetConnection.call(),以处理来自服务器的返回值。可以为两个参数之一或两个参数都传递 null。
result:Function — 如果对服务器的调用成功并返回结果,则此函数被调用。
| |
status:Function (default = null) — 如果服务器返回一个错误,则此函数被调用。
|