Resource limit for this resource type exceeded - Starling
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.
Code:
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));
d_renderTextureArray[selectedTile].draw(new Image(Texture.fromBitmapData(d_bitmapDataArray[selectedTile])));
}
Any help will be much appreciated!!!
Kind regards,
Leo.