Working with sprite sheets
When working with multiple bitmap resources, you may want to consider using a sprite sheet. A sprite sheet is a single bitmap that holds a collection of individual images. Typically, the sheet is separated into a grid with each image occupying identically sized slots.
Once a sprite sheet is loaded into memory, the bitmap data for its individual images can be extracted and stored separately. This allows the data for each image to be accessed quickly by the application.
Let us see how this is done.
Getting ready
From the book's accompanying code bundle, open chapter6\recipe8\recipe.fla
. The majority of the FLA's AIR for iOS settings have been applied as a starting point.
Additionally, a bitmap named sprite-sheet.png
has been ...
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.