A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Resource limit for this resource type exceeded - Starling

  1. #1
    Senior Member
    Join Date
    Sep 2006
    Posts
    248

    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.

  2. #2
    Senior Member
    Join Date
    Sep 2006
    Posts
    248
    Anyone?

  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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. -

  4. #4
    Senior Member
    Join Date
    Sep 2006
    Posts
    248
    Thanks... i am battling with it right now... they are not large, but rather complex...
    Kind regards,
    Leo.

  5. #5
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center