# Resource limit for this resource type exceeded - Starling

**URL:** <https://forum.kirupa.com/t/resource-limit-for-this-resource-type-exceeded-starling/330307>\
**Category:** flash\
**Created:** [December 30, 2012, 5:50pm UTC](https://forum.kirupa.com/t/resource-limit-for-this-resource-type-exceeded-starling/330307 "2012-12-30T17:50:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tompa](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@Tompa](https://forum.kirupa.com/u/Tompa)\
**Post date:** [December 30, 2012, 5:50pm UTC](https://forum.kirupa.com/t/resource-limit-for-this-resource-type-exceeded-starling/330307/1 "2012-12-30T17:50:34Z")

</div>

Hello again!  
I got this annoying error that’s telling me that\*\* _this resource type exceeded_.\*\*  
I’ve tried to catch where the error happens, but wasn’t able to find it.  
If I comment out the red-marked like, this error won’t pop up and everything works.

I’ve double checked the size of the bitmapData and the renderTexture and both are the values as they should be.

```auto
private function swfLoaded(e:LoaderEvent):void {    
    var selectedTile:int = ((e.currentTarget.vars.y >= d_currentMapIndex.y) ? 2 : 0) +( (e.currentTarget.vars.x >= d_currentMapIndex.x) ? 1 : 0);
    var p_index:Point = new Point(e.currentTarget.vars.x - d_currentMapIndex.x, e.currentTarget.vars.y - d_currentMapIndex.y);
    var position_y:int = (((selectedTile == 0) || (selectedTile == 1)) ? (p_index.y + d_zoomIndex) : p_index.y) * d_tileSize;
    var position_x:int = (((selectedTile == 0) || (selectedTile == 2)) ? (p_index.x + d_zoomIndex) : p_index.x) * d_tileSize;
    d_bitmapDataArray[selectedTile].draw(e.currentTarget.content as flash.display.Sprite, new Matrix(1, 0, 0, 1, position_x, position_y));
[COLOR=#ff0000] d_renderTextureArray[selectedTile].draw(new Image(Texture.fromBitmapData(d_bitmapDataArray[selectedTile])));[/COLOR]
}

.

.

.
.
.

What's wrong with the CODE-tag.. ?

```

Been stuck with this error for 3 days now and I can’t figure out why this happens!  
Any help really appreciated!  
_~Tompa_
