I have an array of Sprites on stage and want to now the rectangle that bounds them. I could do a loop and check each element's getBounds() but that could be computationally expensive. Is there a better way to do it?
views:
37answers:
1
+1
A:
You could put them all inside a Sprite, and get the bounding box of that sprite.
Cay
2010-01-27 16:14:58
Yeah but thats not an option. Was hoping there would be some trick involving bitmapData etc to do it.
Arpit
2010-01-27 22:27:06
How about temporarily?If not, the only "elegant" solution I can think of is just looping through them, etc...Another way could be drawing them in a bitmapdata and use getColorBounds, but it would probably be quite slower and dirty than the loop ;)
Cay
2010-02-01 16:33:53