DisplayObject.cacheAsBitmap Problem

Hi guys,

I’m applying a filter to my Bitmap object so the cacheAsBitmap is automatically overridden and set to true.

It’s causing problems when I indirectly resize the Bitmap by changing it’s BitmapData.

Like this:

if(bitmapData)
bitmapData.dispose();

bitmapData=new BitmapData(newWidth,newHeight,true,0x00000000);

…it stays the old size.

I can do this to fix it but maybe there is a better way:

filters=null;

// same as above

filters=myFilterArray;

What do you think ?