我在 Flash CS5.5 (ActionScript 3) 中遇到错误:
ArgumentError:错误 #1063:MethodInfo-185() 上的参数计数不匹配。预期 1,得到 0。在 MethodInfo-186()
但我没有MethodInfo-185()
and MethodInfo-186()
。闪电侠有什么问题?
我在 Flash CS5.5 (ActionScript 3) 中遇到错误:
ArgumentError:错误 #1063:MethodInfo-185() 上的参数计数不匹配。预期 1,得到 0。在 MethodInfo-186()
但我没有MethodInfo-185()
and MethodInfo-186()
。闪电侠有什么问题?
This means yes, you have there an unnamed function. Make sure you have all event listeners enumerated, and check if you have a listener added like this:
addEventListener(Event.ENTER_FRAME,function():void {...});
Any event can be in place of an enter frame event I wrote. If so, this is the line with an error. An event listener function should always accept 1 parameter of corresponding Event type. In this case, the correct line should be:
addEventListener(Event.ENTER_FRAME,function(e:Event):void {...});
Note the parameter type. If you, for example, listen for a "click" mouse event, it should be of MouseEvent type instead.
Flash CS5.5 / AS3 编译器不知何故无法识别嵌套函数。编译器会将嵌套函数(myInnerFunction
如下面的示例)称为MethodInfo-123()
(或类似的东西)。
function myFunction() {
function myInnerFunction() {
}
}