# Help w/ custom classes

**URL:** <https://forum.kirupa.com/t/help-w-custom-classes/305731>\
**Category:** Uncategorized\
**Created:** [March 2, 2010, 8:53pm UTC](https://forum.kirupa.com/t/help-w-custom-classes/305731 "2010-03-02T20:53:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![csbarone](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@csbarone](https://forum.kirupa.com/u/csbarone)\
**Post date:** [March 2, 2010, 8:53pm UTC](https://forum.kirupa.com/t/help-w-custom-classes/305731/1 "2010-03-02T20:53:54Z")

</div>

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

```auto

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

```auto

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.
