This content has been marked as final. Show 5 replies
no, i don't think so. if you did this correctly, you should be able to change _map and NOT have it change _bitmap.
if they were sharing memory, changing _map would change _bitmap.
Thanks kglad for your fast response. Well, what I need is they share memory. _map is like my big map and _bitmap shows part of that big map. So according to you my code is not reusing memory, any suggestion how I can achieve they share memory?
it's the bitmapdata that consumes memory. so, if you use the same bitmapdata with multiple bitmaps, you are not consuming more and more memory with each additional bitmap.
to display a rectangular subsection of titleBitmap, you could use the same bitmapdata object (myMC) and mask the "new" bitmap created from myMC with an appropriate rectangle shape.
I have to use _map because myMC is like a tile map (832x576), several pieces that
I have to put together in _map (1920x1440). That is why I use _map as bitmapdata.
It is not possible to use something like clone(rectangle) in order to avoid memory use?
Thanks in advance
then use the bitmapdata property of titleBitmap to create more bitmaps using the same bitmapdata.