05.24.08
Flex / Flash Error 1137
ActionScript Error #1137: Incorrect number of arguments. Expected no more than 0.
ActionScript 3 Error #1137 Description:
AS3 error 1137 is describing the fact that you have entered a parameter that is not supposed to be inside the parenthesis.
Flash Error 1137 Fix:
Remove all parameters from within the parenthesis.
Bad Code:
var fileToLoad:URLRequest = new URLRequest("cleanhandsworkahsc.swf")
var myLoader:Loader = new Loader(fileToLoad);
this.addChild(myLoader);
Good Code:
var fileToLoad:URLRequest = new URLRequest("cleanhandsworkahsc.swf")
var myLoader:Loader = new Loader();
myLoader.load(fileToLoad);
this.addChild(myLoader);
This should help you resolve Flex / Flash Error #1137
Thanks and as always Happy Flashing
Curtis J. Morley
Sven said,
September 8, 2008 at 3:02 pm
I try to pass a parameter (string) to a class on instatiation, but I keep getting the error: 1137: Incorrect number of arguments. Expected no more than 0.
For testing I try:
var mythumb:myThumb = new myThumb(”A String”);
I have a library symbol with a Class name: myThumb
with a Base Class of CaseThumb which resides in the path com.svdelle.CaseThumb.
And in the Class I have:
public function CaseThumb(image:String = “Image URL”):void
What am I chokin’ on here? Can anyone see my mistake?
I do the exact same thing on other Classes with no problem, so I think I’m fumbling around with this Class/Base Class thing …