Categorías
- ActionScript (2)
- ActionScript (English) (7)
- Gaming (3)
- Uncategorized (1)
- Work related (6)
Archivos
- mayo 2012 (5)
- febrero 2011 (1)
- noviembre 2009 (7)
- octubre 2009 (1)
- septiembre 2009 (2)
- agosto 2009 (2)
Flash log en "La Nube"
The “CacheAsBitmap” flag:
When you ask Flash to use cacheAsBitmap on an image, it stores a copy of the vector image´s point array in memory (for swapping), but uses a converted version (converted to bitmap) for rendering, so the vector image doesnt need to be calculated and redrawn every frame. Thanks to the saved point array, display objects can be swapped to and from bitmap format as much as one needs.
USAGE: Use on complex vector images that don’t transform, for example complex background images (moving or not), non-animated sprites and most user interface elements.
ADVANTAGES: Bitmaps, unlike vectorial images, are not recalculated on every frame by the flash player unless they suffer a transformation. Thanks to this, cacheAsBitmap allows for some performance gains when handling static and complex vectorials.
WARNING: Animated (transforming) objects are going to be redrawn regardless if they are bitmaps or vectors, so using CacheAsBitmap on animated Sprites or MovieClips would actually make it slower than a vector, forcing flash to recalculate the vectorial image, redraw it, save it and get the bitmap copy done once every frame for as long as the object is being changed internally.
Pingback: Flash Performance Article Series « Flasheando