Performing bitmap animation with ActionScript
It might be the obvious choice for most situations, but the timeline isn't the only way to perform frame-by-frame animation. With a collection of BitmapData
objects stored in memory, it is perfectly possible to apply animations to Bitmap
objects using ActionScript.
We will see how to do that in this recipe.
Getting ready
You can continue to work with the code you wrote during the Working with sprite sheets recipe. Alternatively, open chapter6\recipe9\recipe.fla
from the book's accompanying code bundle and work from there. You will also find the FLA's document class and a sprite sheet in the same folder. The sprite sheet has already been added to the Included files list in the FLA's AIR for iOS Settings ...
Get Flash iOS Apps Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.