Search code examples
actionscript-3blackberry-playbook

Warning: 3D DisplayObject will not render. Its dimensions (6711131, 6711131) are too large to be drawn


I'm very very new on ActionScript 3.0 for BlackBerry Playbook.

I'm trying to resize an image loaded with Loader class. But, when I set up its new size with this function:

private function loaded(event:Event):void
{
    var targetLoader:Loader = Loader(event.target.loader);
    targetLoader.height = 240;
    targetLoader.width = 240;
}

I get the following error:

Warning: 3D DisplayObject will not render. Its dimensions (6711131, 6711131) are too large to be drawn.

I'm using two images: one has 152.292 bytes, the other has 170.663 bytes


Solution

  • That's because the z property of your object is not 0 (so is in 3D) or it has a child in 3D that is it to big to draw. When you resize an object in flash 3D for example 2x the result may not be 2x (think in a plane) flash draws objects in 2D and the rectangle is to big to be drawn.

    When the objects are rotated you enlarge this result:

    enter image description here

    In this example the difference is 31 pixels, but in larger images the difference would be enormous, like in your case of 6711131 pixels