I got this error-
'ArgumentError: Error #1112: Argument count mismatch on class coercion. Expected 1, got 0.'
What does it mean? Can you answer in layman's terms for me?
I got this error-
'ArgumentError: Error #1112: Argument count mismatch on class coercion. Expected 1, got 0.'
What does it mean? Can you answer in layman's terms for me?
Code plz, I looked it up and it seems like you tried to turn an object into something that it is not.
Like you tried making a ball into a tank for example.
It would help if you posted the code that is giving you problems. I can't seem to find out what would cause this error. The Flash docs don't say anything, and I can't find much online (except one case where someone was trying to use the class constructor for a recursive function I believe, which may be your problem).
As has been said already, code snippet would help. But it sounds like you're doing; for example.
var s:String = String();
var a:Array = Array();
var m:MovieClip = MovieClip();
instead of:
var s:String = new String();
var a:Array = new Array();
var m:MovieClip = new MovieClip();
Calling 'String()' without 'new' is a method for coercing one type to another for example:
var s:String = String(new Array(1,2,3)); // s = "1,2,3"
var i:int = int(1.57); // i = 1