title: Why is this throwing errors?
body: <p>I am building a cube from an image in flash. The loader loads a sprite-map of the images:</p>
  
  <pre><code>+----++----++----++----++----++----+
  |frnt||rght||back||left||top ||bot |
  |    ||    ||    ||    ||    ||    |
  +----++----++----++----++----++----+
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <blockquote>
    <p>Error #2005: Parameter 0 is of the incorrect type. Should be type BitmapData.</p>
  </blockquote>
  
  <p>On the line <code>front.draw(src, null, null, null, clip);</code> (confirmed by commenting out code and <em>not</em> receiving an error). But I'm not sure why. I <em>defined</em> <code>src</code> as <code>BitmapData</code>, and a <code>trace</code> of <code>src</code> produces <code>[object BitmapData]</code>.</p>
  
  <pre><code>private function loaderCompleteListener(e:Event):void
  {
    log('Complete');
    var front:BitmapData,
      right:BitmapData,
      back:BitmapData,
      left:BitmapData,
      top:BitmapData,
      bottom:BitmapData,
      srcData:Bitmap,
      src:BitmapData,
      clip:Rectangle;
  
    try
    {
      srcData = this._imageLoader.content as Bitmap;
      src = srcData.bitmapData;
      front = new BitmapData(src.height, src.height, false, 0);
      right = new BitmapData(src.height, src.height, false, 0);
      back = new BitmapData(src.height, src.height, false, 0);
      left = new BitmapData(src.height, src.height, false, 0);
      top = new BitmapData(src.height, src.height, false, 0);
      bottom = new BitmapData(src.height, src.height, false, 0);
      clip = new Rectangle(0, 0, src.height, src.height);
  
      //This is the line that causes the error
      front.draw(src, null, null, null, clip); //&lt;----
      clip.x += src.height;
      right.draw(src, null, null, null, clip);
      clip.x += src.height;
      back.draw(src, null, null, null, clip);
      clip.x += src.height;
      left.draw(src, null, null, null, clip);
      clip.x += src.height;
      top.draw(src, null, null, null, clip);
      clip.x += src.height;
      bottom.draw(src, null, null, null, clip);
    }
    catch ( e:Error )
    {
      log(e.message);
    }
  }
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Edit to add:</p>
  
  <p>One consideration may be the image size. I'm loading an image that's 1866&times;11196. I will test tomorrow to see if a smaller image works. It may just be that Flash can't handle images beyond a certain size.</p>