| 包 | 顶级 |
| 类 | public dynamic class ReferenceError |
| 继承 | ReferenceError Error Object |
| 语言版本 : | ActionScript 3.0 |
| Player 版本 : | Flash Player 9 |
但是,引用动态类的未定义属性不会引发 ReferenceError 异常。 有关详细信息,请参阅 dynamic 关键字。
另请参见
| 方法 | 定义方 | ||
|---|---|---|---|
|
ReferenceError(message:String = "")
创建一个新的 ReferenceError 对象。
| ReferenceError | ||
![]() |
在构造错误时,以字符串形式返回错误的调用堆栈(仅适用于 Flash Player 的调试版)。
| Error | |
![]() |
指示对象是否已经定义了指定的属性。
| Object | |
![]() |
指示 Object 类的实例是否在指定为参数的对象的原型链中。
| Object | |
![]() |
指示指定的属性是否存在、是否可枚举。
| Object | |
![]() |
设置循环操作动态属性的可用性。
| Object | |
![]() |
默认情况下,返回字符串 "Error";如果已定义,则返回 Error.message 属性中包含的值。
| Error | |
![]() |
返回指定对象的原始值。
| Object | |
| ReferenceError | () | 构造函数 |
public function ReferenceError(message:String = "")
| 语言版本 : | ActionScript 3.0 |
| Player 版本 : | Flash Player 9 |
创建一个新的 ReferenceError 对象。
参数message:String (default = "") — 包含与 ReferenceError 对象关联的消息。
|
另请参见
ReferenceError 异常是如何生成的,以及如何在 try..catch 语句中进行处理。
package {
import flash.display.Sprite;
public class ReferenceErrorExample extends Sprite {
public function ReferenceErrorExample() {
try {
this["someMember"] = true;
}
catch(e:ReferenceError) {
trace(e);
}
}
}
}
当前页: http://livedocs.adobe.com/flash/9.0_cn/ActionScriptLangRefV3/ReferenceError.html