The following errors can occur at run time. Run-time type checking occurs in ActionScript 3.0 whether you compile in strict mode or warning mode.


 代码消息说明
 1000The system is out of memory. Flash Player needs more memory to compile your code than your system has available. Close some of the applications or processes running on your system.
 1001The method %1 is not implemented. 
 1002Number.toPrecision has a range of 1 to 21. Number.toFixed and Number.toExponential have a range of 0 to 20. Specified value is not within expected range. You specified a value that is not within the expected range of the precision argument. Number.toPrecision has a range of 1 to 21. Number.toFixed and Number.toExponential have a range of 0 to 20.
 1003The radix argument must be between 2 and 36; got %1. You passed a value less than 2 or greater than 36 for the radix argument of a method or property. Pass a value between 2 and 36 as a radix argument.
 1004Method %1 was invoked on an incompatible object. You tried to call a method that is not available to the specified object. This error occurs when you have copied a prototype function from one object to another, and then invoked it, but the target object is not the same type as the original object. Ensure that the target object and original object are the same type. See the ECMAScript Language Specification, 3rd Edition, Chapter 15 for more details.
 1005Array index is not a positive integer (%1). You tried to access a member of an array using an index value that is not a positive integer. Pass only positive integers as index values for arrays.
 1006%1 is not a function. This error occurs when you attempt to call a function that does not exist. Make sure you are calling the correct function, and that the API has not changed from ActionScript 2.0. Also, make sure you are using the correct object. For example, you will see this error when you use the following code (because the last line mistakenly calls the variable big instead of blg):
var blg:String = "foo";
var big:Sprite = new Sprite();
var error:int = big.length(); 
 1007Instantiation attempted on a non-constructor. 
 1008%1 is ambiguous; Found more than one matching binding. 
 1009Cannot access a property or method of a null object reference. An object that evaluates to null can have no properties. This error can occur in some unexpected (though valid) situations. For example, consider the following code, which creates a Sprite object. Because this Sprite object is never added to the display list (through the addChild() method of a DisplayObjectContainer object), its stage property is set to null. Thus, the example generates this error because Sprite object's stage property cannot have any properties:
import flash.display.Sprite;
var sprite1:Sprite = new Sprite();
var q:String = sprite1.stage.quality;
 1010A term is undefined and has no properties. This error can occur if you try to access a property of an object that does not exist. For example:
var obj:Object = new Object();
obj.a = "foo";
trace(obj.b.prop);

You can also see this error because of a misspelling, for example in the following, where mc represents a MovieClip object in the display list, and the stage property is misspelled with a capital S (it should be stage):

trace(mc.Stage.quality);
 1011Method %1 contained illegal opcode %2 at offset %3. See the note at the bottom of this table.*
 1012The last instruction exceeded code size. See the note at the bottom of this table.*
 1013Cannot call OP_findproperty when scopeDepth is 0. See the note at the bottom of this table.*
 1014Class %1 could not be found. 
 1015Method %1 cannot set default xml namespace See the note at the bottom of this table.*
 1016Descendants operator (..) not supported on type %1. 
 1017Scope stack overflow occurred. See the note at the bottom of this table.*
 1018Scope stack underflow occurred. See the note at the bottom of this table.*
 1019Getscopeobject %1 is out of bounds. See the note at the bottom of this table.*
 1020Code cannot fall off the end of a method. See the note at the bottom of this table.*
 1021At least one branch target was not on a valid instruction in the method. See the note at the bottom of this table.*
 1022Type void may only be used as a function return type. See the note at the bottom of this table.*
 1023Stack overflow occurred. See the note at the bottom of this table.*
 1024Stack underflow occurred. See the note at the bottom of this table.*
 1025An invalid register %1 was accessed. See the note at the bottom of this table.*
 1026Slot %1 exceeds slotCount=%2 of %3. See the note at the bottom of this table.*
 1027Method_info %1 exceeds method_count=%2. See the note at the bottom of this table.*
 1028Disp_id %1 exceeds max_disp_id=%2 of %3. See the note at the bottom of this table.*
 1029Disp_id %1 is undefined on %2. See the note at the bottom of this table.*
 1030Stack depth is unbalanced. %1 != %2. See the note at the bottom of this table.*
 1031Scope depth is unbalanced. %1 != %2. See the note at the bottom of this table.*
 1032Cpool index %1 is out of range %2. See the note at the bottom of this table.*
 1033Cpool entry %1 is wrong type. See the note at the bottom of this table.*
 1034Type Coercion failed: cannot convert %1 to %2. 
 1035Illegal super expression found in method %1. See the note at the bottom of this table.*
 1037Cannot assign to a method %1 on %2. See the note at the bottom of this table.*
 1038%1 is already defined. You cannot declare a variable or function with the same identifier name more than once within the same scope. In ActionScript 3.0, different code blocks (such as those used in two for loops in the same function definition) are considered to be in the same scope. See the note at the bottom of this table.*
 1039Cannot verify method until it is referenced. See the note at the bottom of this table.*
 1040The right-hand side of instanceof must be a class or function. The expression on the right side of the instanceof operator must be a class or function.
 1041The right-hand side of operator must be a class. The expression on the right side of the is operator must be a class.
 1042Not an ABC file. major_version=%1 minor_version=%2. You are attempting to use an invalid file with the player: the tool that generates the SWF may be out of date or the SWF itself may be corrupt.
 1043Invalid code_length=%1. See the note at the bottom of this table.*
 1044MethodInfo-%1 unsupported flags=%2. See the note at the bottom of this table.*
 1045Unsupported traits kind=%1. See the note at the bottom of this table.*
 1046MethodInfo-%1 referenced before definition. See the note at the bottom of this table.*
 1047No entry point was found. See the note at the bottom of this table.*
 1049Prototype objects must be vanilla Objects. See the note at the bottom of this table.*
 1050Cannot convert %1 to primitive. See the note at the bottom of this table.*
 1051Illegal early binding access to %1. See the note at the bottom of this table.*
 1052Invalid URI passed to %1 function. See the note at the bottom of this table.*
 1053Illegal override of %1 in %2. See the note at the bottom of this table.*
 1054Illegal range or target offsets in exception handler. See the note at the bottom of this table.*
 1056Cannot create property %1 on %2. You are trying to assign a value to a nonexistent property on an instance of a non-dynamic class. This is only possible for instances of dynamic classes
 1057%1 can only contain methods. See the note at the bottom of this table.*
 1058Illegal operand type: %1 must be %2. See the note at the bottom of this table.*
 1059ClassInfo-%1 is referenced before definition. See the note at the bottom of this table.*
 1060ClassInfo %1 exceeds class_count=%2. See the note at the bottom of this table.*
 1061The value %1 cannot be converted to %2 without losing precision. This error appears if you attempt to assign a decimal number to a property that has data type int.

This error also appears for out-of-range assignments, such as the following:

var m0:int = 2147483648; // int.MAX_VALUE == 2147483647

You can also see this error when using the bitwise left shift operator (<<). For example, consider the following code:

var m0:uint = 0xFF;
var m1:uint = m0<<24;

The result of left shift operator (<<) is interpreted as a 32-bit two's complement number with sign. In the example, the result is a negative value, which causes the error when assigned to the uint typed property. A workaround is the following:

var m0:uint = 0xFF;
var m1:uint = uint(m0<<24);
 1063Argument count mismatch on %1. Expected %2, got %3. 
 1064Cannot call method %1 as constructor. Extracted methods are permanently bound to the object they are extracted from. Therefore, they can not later be called as a constructor. For example, the following creates function f() in Class A:
class A {
	   function f() {}
	}
In the following code, extracting the function causes no error. However, creating a new instance of the function causes an error.
var a = new A()
	var m = a.f // extract f, don't call it
	m() // same as a.f()
	new m() // causes this error
 1065Variable %1 is not defined. You are using an undefined lexical reference. For example, in the following statements, the statement trace(x) generates an error because x is undefined. However, the statement trace(y) doesn't generate an error because y is defined:
trace("hello world")
	trace(x) // x is undefined
	var y
	trace(y) // No error, y is defined.
 1066The form function('function body') is not supported. Unlike JavaScript, Flash does not compile code on-the-fly using eval() and function(). Thus, calling these as a constructor in ActionScript 3.0 generates this error.
 1067Native method %1 has illegal method body. See the note at the bottom of this table.*
 1068%1 and %2 cannot be reconciled. See the note at the bottom of this table.*
 1069Property %1 not found on %2 and there is no default value. You are referencing an undefined property on a non-dynamic class instance. For example, the following generates this error when it references property x, which is not defined and cannot be created dynamically:
class A {} // sealed class, not dynamic
	trace(new A().x) // no property x defined on A, and A is not dynamic
 1070Method %1 not found on %2 You are using a super statement to call a function, but the function doesn't exist in the super class. For example, the following code generates the error:
class A() {}
class B extends A {
  function f() { trace(super.f()); } // error 1070, there is no f on A
}
 1071Function %1 has already been bound to %2. 
 1072Disp_id 0 is illegal. See the note at the bottom of this table.*
 1073Non-override method %1 replaced because of duplicate disp_id %2. See the note at the bottom of this table.*
 1074Illegal write to read-only property %1 on %2. 
 1075Math is not a function. You are trying to call math() as a function, but the Math class is a class with static methods.
 1076Math is not a constructor. You can not instantiate the Math class.
 1077Illegal read of write-only property %1 on %2. 
 1078Illegal opcode/multiname combination: %1<%2>. See the note at the bottom of this table.*
 1079Native methods are not allowed in loaded code. See the note at the bottom of this table.*
 1080Illegal value for namespace. See the note at the bottom of this table.*
 1081Property %1 not found on %2 and there is no default value. 
 1082No default namespace has been set. See the note at the bottom of this table.*
 1083The prefix "%1" for element "%2" is not bound. An attribute name or element name has a prefix but no matching namespace was found. This statement generates an error because there is no foo namespace to match foo:x:
<foo:x xmlns:clowns='http://circuscenter.org'>
 1084Element or attribute ("%1") does not match QName production: QName::=(NCName':')?NCName. You have foo: or :foo as an element or attribute name, but there is nothing on the other side of the colon.
 1085The element type "%1" must be terminated by the matching end-tag "". 
 1086The %1 method only works on lists containing one item. The XMLList class propagates the XML-specific functions to one child if it has only one item in its list. If more than one item is in the list, the routines fail with this error. This happens for the following XMLList functions that mimic XML functions:

addNamespace, appendChild, childIndex, inScopeNamespaces, insertChildAfter, insertChildBefore, name, namespace, localName, namespaceDeclarations, nodeKind, prependChild, removeNamespace, replace, setChildren, setLocalName, setName, and setNamespace.

 1087Assignment to indexed XML is not allowed. 
 1088The markup in the document following the root element must be well-formed. These are possible causes of this error:
  • Parsing an XMLList style object as XML
  • Misbalanced strings
 1089Assignment to lists with more than one item is not supported. 
 1090XML parser failure: element is malformed. An element name is malformed. This example of an element name is malformed because a trailing right angle bracket > is missing:
<a/><b></b
 1091XML parser failure: Unterminated CDATA section. 
 1092XML parser failure: Unterminated XML declaration. 
 1093XML parser failure: Unterminated DOCTYPE declaration. 
 1094XML parser failure: Unterminated comment. 
 1095XML parser failure: Unterminated attribute. 
 1096XML parser failure: Unterminated element. 
 1097XML parser failure: Unterminated processing instruction. 
 1098Illegal prefix %1 for no namespace. The namespace constructor throws this error if you try to pass in an empty URI with a non-empty prefix as in this example:
ns = new Namespace ("prefix", "");
	
 1100Cannot supply flags when constructing one RegExp from another. Creating a new regular expression from an existing one also copies its flags. To create a regular expression with different flags, use the new operator and set the flags as desired. For example, this statement creates a regular expression and specifies flag settings:
var re:RegExp = new RegExp("ali", /s)
Alternatively, this statement creates a regular expression that has the same flags as re:
var re2:RegExp = new RegExp(re, ...)
 1101Cannot verify method %1 with unknown scope. See the note at the bottom of this table.*
 1102Illegal default value for type %1. See the note at the bottom of this table.*
 1103Class %1 cannot extend final base class. See the note at the bottom of this table.*
 1104Attribute "%1" was already specified for element "%2". 
 1107The ABC data is corrupt, attempt to read out of bounds. See the note at the bottom of this table.*
 1108The OP_newclass opcode was used with the incorrect base class. See the note at the bottom of this table.*
 1109Attempt to directly call unbound function %1 from method %2. See the note at the bottom of this table.*
 1110%1 cannot extend %2. See the note at the bottom of this table.*
 1111%1 cannot implement %2. See the note at the bottom of this table.*
 1112Argument count mismatch on class coercion. Expected 1, got %1. 
 1113OP_newactivation used in method without NEED_ACTIVATION flag. See the note at the bottom of this table.*
 1114OP_getglobalslot or OP_setglobalslot used with no global scope. See the note at the bottom of this table.*
 1115%1 is not a constructor. 
 1116second argument to Function.prototype.apply must be an array. 
 1117Invalid XML name: %1. 
 1118Illegal cyclical loop between nodes. 
 1119Delete operator is not supported with operand of type %1. 
 1120Cannot delete property %1 on %2. 
 1121Method %1 has a duplicate method body. 
 1122Interface method %1 has illegal method body. 
 1123Filter operator not supported on type %1. 
 1124OP_hasnext2 requires object and index to be distinct registers. 
 1502A script has executed for longer than the default timeout period of 15 seconds. A script executed after the timeout period. (The default timeout period is 15 seconds.) After this error occurs, the script can continue to execute for 15 seconds more, after which the script terminates and throws run-time error number 1503 (A script failed to exit after 30 seconds and was terminated.)
 1503A script failed to exit after 30 seconds and was terminated. The script was still executing after 30 seconds. Flash Player first throws run-time error number 1502 (A script has executed for longer than the default timeout period of 15 seconds.) if the script executed more than 15 seconds, which is the default timeout period. This error occurs 15 seconds after Error 1502 occurs.
 1507Argument %1 cannot be null. 
 1508The value specified for argument %1 is invalid. You are possibly trying to pass the wrong data type. For example, the code
public function doSomething(const:int):void {
	}
	this ["doSomething"] ("str")
generates an error at runtime because doSomething is cast as an int data type.
 1510When the callback argument is a method of a class, the optional this argument must be null. 


* 注意:此错误指示 SWF 中的 ActionScript 无效。 如果您认为文件未损坏,请向 Adobe 报告此问题。