Hi guys,
I have a class that extends Sprite, in the constructor I do this:
surface=new BitmapData(100,100,true,0x00000000);
bitmap=new Bitmap(surface);
addChild(bitmap);
…so now I can use surface.copyPixels() for some fast blitting.
The thing is, I want to resize the whole thing dynamically.
This seems to work fine but is it safe ?
bitmap.bitmapData=new BitmapData(200,200,true,0x00000000);
…can I keep doing that ? I’m use to C(++) so it seems unsafe.
Also, it will not work if I replace bitmap.bitmapData with surface, like so:
surface=new BitmapData(200,200,true,0x00000000);
…which I don’t understand. Any help would be appreciated.
Thanks.