Re: [flexcoders] cacheAsBitmap - does anyone know?

2007-03-06 Thread Guy Morton
Thanks Patrick. That's pretty much what I suspected would be the case.

Guy



Re: [flexcoders] cacheAsBitmap - does anyone know?

2007-03-06 Thread Patrick Mineault
You should only use cacheAsBitmap if you plan on modifying x, y, and 
alpha properties of a sprite. Changing rotation or scale means that the 
cache will be reset, so you will have worse performance. Adding a filter 
to anything sets cacheAsBitmap to true on it, but not on any of its 
children. Nevertheless, you should know that if a parent container uses 
a filter, moving or doing in the children of the container will cause 
the filter to be flushed and recalculated.

Patrick

Guy Morton a écrit :
>
> I've created an mxml component that uses a canvas object and writes a
> graphic on it based on some input parameters. This graphic is then
> animated over a bitmap background. If I set cacheAsBitmap on the
> graphic's canvas to true, then rotate the canvas, am I improving
> performance? Or does the rotate mean flash will throw away the
> previously cached bitmap and make a new one?
>
> Also, does having a drop shadow filter on the parent canvas container
> affect the behaviour of cacheAsBitmap?
>
> Guy
>
>  



[flexcoders] cacheAsBitmap - does anyone know?

2007-03-06 Thread Guy Morton

I've created an mxml component that uses a canvas object and writes a
graphic on it based on some input parameters. This graphic is then
animated over a bitmap background. If I set cacheAsBitmap on the
graphic's canvas to true, then rotate the canvas, am I improving
performance? Or does the rotate mean flash will throw away the
previously cached bitmap and make a new one?

Also, does having a drop shadow filter on the parent canvas container
affect the behaviour of cacheAsBitmap?

Guy