Seb Lee-Delisle

Menu

A cacheAsBitmap vs superCacheAsBitmap demo

Here’s another demo of the work we’ve been doing on a custom cacheAsBitmap utility, we’re calling superCacheAsBitmap.

The circle in the middle of the demo is made up of 1000 transparent lines, so you shouldn’t be surprised that it’s very slow to render using traditional methods! Click Move Clip to get things started, and you’ll see what I mean.

Select the cacheAsBitmap option and it’s speeds up! Yay! But now hit the Rotate Clip button, and we’re back down to a grind. This is because the MovieClip’s appearance changes and the Flash Player has to re-render the clip every frame.

So now select the superCacheAsBitmap, and we’re back up to speed! We’re creating a bitmap and rotating that instead. You’ll see though that the quality isn’t very good, but often when we’re moving things at speed this isn’t a problem. But if it is, just select superCacheAsBitmap with smoothing and this time the player rotates the bitmap with interpolation. It’s slower but not as slow as without caching.

Code coming as soon as I package it up!

This entry was posted in Actionscript, Flash, Flash Physics. Bookmark the permalink.

18 Responses to A cacheAsBitmap vs superCacheAsBitmap demo

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current ye@r *