Get BitmapData inside Sprite
Hi,
Following Problem:
I want to get the BitmapData from a Child Bitmap of a Sprite. I can get the Bitmap but not the BitmapData. I dont want to save it in an extra variable.
(BitmapData(flySprite.getChildAt(0).bitmapData) // Doesnt Work
(Bitmap(flySprite.getChildAt(0)) // does Work but not with .bitmapData
How can I get the bitmapData without saving in a new Bitmap (that works...)? is there a way to call the BitmapData with "flySprite.flyBitmap.bitmapData"? How do i have to add the Bitmap, that this works?
my favorite solution would be not to use a Sprite at all, but i need the registrationpoint in center and after drawing the bitmap, the registration is in the top-left corner. I tried to chage it with
matrix.identity();
matrix.translate(-(flyBmp.width / 2), -(flyBmp.height / 2 ));
flyBmp.transform.matrix = matrix;
etc. pp.
It changed nothing... does the registration change back in every frame or something?
thanks, Megaloadon
