-
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.
-
-
Senior Member
You are running out of memory. So I wonder how large and complex the objects are, which you draw and whether they may be too large and complex.
- The right of the People to create Flash movies shall not be infringed. -
-
Thanks... i am battling with it right now... they are not large, but rather complex...
Kind regards,
Leo.
-
Senior Member
If you can dispose anything else you don't need to free up memory would be good. here is an article by adobe about that.
http://help.adobe.com/en_US/as3/mobi...7189-7ffc.html
- The right of the People to create Flash movies shall not be infringed. -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|