title: How to instantiate an array of custom classes in Action Script 3.0
body: <p>I'm new to AS3 and I'm getting this error while trying to implement OO style code.</p>
  
  <pre><code>  Incorrect number of arguments.  Expected no more than 0.
  </code></pre>
  
  <p>When I try to:</p>
  
  <pre><code>var countries:Country = new Country(10);
  </code></pre>
  
  <p>Normally this would work in Java or C++, so I'm not sure what's up!?</p>
  
  <p>Here is my custom class.</p>
  
  <p>package  {</p>
  
  <pre><code>public class Country {
  
      var cName:String = "noName"; 
      public function Country() {
          // constructor code
      }
  
      public function setName(n:String):void {
          cName = n;
      }
      public function getName():String {
          return cName;
      }
  
  
  }
  
  }
  </code></pre>