Rasterization can be expensive and should be minimized. For display objects that only experience translation along the X and Y axes, there is a technique available that removes the need for that object to be re-rasterized. This technique is known as Cache as Bitmap and in most circumstances can accelerate the rendering performance of your application.
Cache as Bitmap takes a display object and generates a bitmap representation of it internally. The cached bitmap is then used for rendering rather than re-rasterizing the original display object. This can result in huge performance gains, particularly when working with complex vector artwork, which can be CPU-intensive to rasterize.
Normally, when a display object changes position, it needs to be re-rasterized. When cached, however, any two-dimensional translations will no longer result in that object being redrawn. Instead, its cached bitmap will be used.
Let us see how to apply Cache as Bitmap using both ActionScript and...