I’m a bit confused why I keep getting a “1136: Incorrect number of arguments. Expected 1.” error.
What I’m doing is trying to understand how classes work I’m making a few test classes to see how they work together. Again still very new with creating and using custom classes so any tips would be great.
What I’m doing is making a blank fla and tying it to a class of Test1 which is in the same directory of my fla. I have two custom classes first is Test1.as second is Test2.as the code for each looks like the following.
Test1.as
package{
import flash.display.MovieClip;
public class Test1 extends MovieClip
{
public function Test1():void
{
init();
}
private function init():void
{
trace("init function ran in test1.as");
Test2();
}
}
}
Test2.as
package{
public class Test2
{
public function Test2():void
{
trace("Test2 function ran");
init();
}
private function init():void
{
trace("init function ran in Test2.as");
}
}
}
when I test these files i get the “1136: Incorrect number of arguments. Expected 1.” error when it tries to run Test2(); function in the Test1 class.
I’m completely lost as why that is asking for an argument when that function doesn’t require one.