title: As3 Static Method Call Internal Method
body: <p>I downloaded a script from the internet and it works perfect. I started to adapt the code in it for a new application. But I get the following error <strong>1061: Call to a possibly undefined method drawShape through a reference with static type Class.</strong> </p>
  
  <p>When looking at the code I see that the method that is calling drawShape is a static method calling it as such: <strong>ShapeDrawer.drawShape();</strong> Note that the ShapeDrawer class isn't being imported at all. </p>
  
  <p>Then the drawShape method is as such: <strong>internal function drawShape()</strong> Can anyone explain to me why it may work in the application I downloaded and not mine. His was built for use with flash player 9 and mine is ten that may play a part.</p>
  
  <p>This is what it looks like:</p>
  
  <pre><code>package puzzle
  {
      import flash.geom.Point;    
      import utils.MyMath;
  
      public class PuzzleCaculater
      {
          public static function combineTwoPieces(pieceA:PuzzlePiece , pieceB:PuzzlePiece):void
          {
              for each(var drawingPiece in pieceB.unionPieces)
              {
                  ShapeDrawer.drawShape(pieceA.graphicLayer , drawingPiece.shapeData , true);
                  drawingPiece.disactive();
                  drawingPiece.myGroup = pieceA.myGroup;
                  drawingPiece.graphicLayer = pieceA.graphicLayer;
                  pieceA.unionPieces.push(drawingPiece);
                  drawingPiece.unionPieces = pieceA.unionPieces;
              }
          }
      }
  }
  
  package puzzle
  {
      public class ShapeDrawer
      {
          internal function drawShape(target:Shape , drawingShapedata:Object , useBitmap:Boolean = true):void
          {
              var leftShape:Array= drawingShapedata.leftShape;
              var topShape:Array= drawingShapedata.topShape;
              var rightShape:Array= drawingShapedata.rightShape;
              var bottomShape:Array= drawingShapedata.bottomShape;
              var shapes:Array= [];
              shapes.push(leftShape);
              shapes.push(topShape);
              shapes.push(rightShape);
              shapes.push(bottomShape);
          }
      }
  }
  </code></pre>