SWF Sprite Sheet

Updated On: April 9, 2013

SWF Sprite Sheet Component

This component handles extracting each frame from a swf movieclips timeline. it extracts both the image data as well as the registration point of each frame. This is important for lining up an extracted swf animation. When scaling a swf sprite sheet you will notice that the resolution of the final frame is preserved perfectly. This is what we call a vector bitmap. Just like a SWF Renderer this component allows you to use the root swf or an embedded symbol inside of a swf movieclip.


This sprite sheet does not use a divider because the size and location of each frame is derived from the embedded movieclip timeline.


  • swf - A SWF Resource file containing the swf file you want to renderer.
  • clipName - is the name of the embedded symbol name from the flash pro library.
  • smoothing - adds smoothing to the final generated bitmap frame.
  • scale - the scale used to drawn each frame of the swf movieclip

Code Sample

var entity : IEntity = PBE.allocateEntity();

//Create a sprite sheet of the swf movieclip
//This component caches and stores each frame's data to save memory
//Basic 2D version, just add G2D onto the end of the class name to render using Starling
var sheet : SWFSpriteSheetComponent = new SWFSpriteSheetComponent();
sheet.filename = "assets/swfsheet.swf";

entity.addComponent(sheet, "SWFSpriteSheet");

var sheetRenderer : SpriteSheetRenderer = new SpriteSheetRenderer();
sheetRenderer.spriteSheet = sheet;

entity.addComponent(sheetRenderer, "SpriteSheetRenderer");

Follow Us For Updates