# Too many bitmaps?

**URL:** <https://forum.kirupa.com/t/too-many-bitmaps/303332>\
**Category:** flash\
**Created:** [January 18, 2010, 9:38pm UTC](https://forum.kirupa.com/t/too-many-bitmaps/303332 "2010-01-18T21:38:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmennenoh](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@dmennenoh](https://forum.kirupa.com/u/dmennenoh)\
**Post date:** [January 18, 2010, 9:38pm UTC](https://forum.kirupa.com/t/too-many-bitmaps/303332/1 "2010-01-18T21:38:41Z")

</div>

I’ve been working on a simple mosaic generator for a project and have been crashing Flash consistently by trying to add too many bitmaps to a Sprite. I can crash Flash every time with the following:

for(var i:int = 0; i \< 10000; i++){  
var d:BitmapData = new BitmapData(20,20);  
addChild(new Bitmap(d));  
}

I get a 2015 error - invalid BitmapData.

9000 works without issue… 10000 crashes. Problem is I need 10000.

Is this a known limitation? I could try using multiple sprites and adding say 5000 to each, but that wouldn’t be easy with this project. But if I have to I have to…
