title: Flash AS3 - 1046: Type was not found or was not a compile-time constant:
body: <p>I asked a question the other day and it taught me a fair bit about display objects and stuff. I have another problem though.</p>
  
  <p>This is my document class : </p>
  
  <pre><code>package 
  {
  
      import flash.display.MovieClip;
      import flash.display.Stage;
  
      public class Engine extends MovieClip
      {
  
          public function Engine()
          {
              var calling:Callitems = new Callitems(cat, BluKnife)
  
              stage.addChild(calling);
  
          }
  
      }
  
  }
  </code></pre>
  
  <p><code>cat</code> and <code>BluKnife</code> are movieclips in my library with as3 linkage to those names.</p>
  
  <p>Now here is the <code>Callitems</code> Class</p>
  
  <pre><code>package 
  {
  
      import flash.display.MovieClip;
      import flash.display.Stage;
      import flash.display.InteractiveObject;
  
  
      public class Callitems extends MovieClip{
  
  
      public function Callitems(Enemy1, Enemy2)
      {
          var knife:Enemy1 = new Enemy1();
  
          this.addChild(knife);
          knife.x = 200;
  
  
          var ct:Enemy2 = new Enemy2();
  
          this.addChild(ct);
  
  
      }
  
  }
  
  }
  </code></pre>
  
  <p>Now my problem is that when I wasn't giving <code>Callitems</code> arguments and was instead just making <code>Enemy1</code>, <code>cat</code> and making <code>Enemy2</code>, <code>Bluknife</code> both of those movieclips were added to the stage as expected. But now that I'm trying to make <code>Callitems</code> take arguments so that I can place different clips at certain times I'm getting the following error:</p>
  
  <p>1046: Type was not found or was not a compile-time constant: Enemy1.
  1046: Type was not found or was not a compile-time constant: Enemy2.</p>
  
  <p>Thanks everyone, any help is much appreciated</p>
  
  <p>Edit: I did search this site for that same error, but I don't understand the problem in this context, sorry!</p>