Vector based graphics don’t always meet your needs for different reasons, and exporting assets one by one can be a real time-consuming task. Learn how to simplify this process with SWFToPNG.
Step 1: What is SWFToPNG?
SWFToPNG is an Adobe AIR application that will help you convert your library assets into PNG format quickly and painlessly.
Step 2: How it Works
In order to work with the utility you will need a SWF file (to extract the graphics from) and you must use a Class name in the MovieClips that you want to export.
The main (and only) window shows the instructions, a button to browse for a SWF and three options:
- Crop: Removes the transparent area around the edges of the graphic.
- Center Registration Points: Locks the registration point to the center of the graphic.
- Entire Stage: Exports all the stage elements.
Step 3: About the Tool
SWFToPNG is a utility created for personal use and the released to the public by its author. It’s pointed out in the tool site that you may get errors or undesired results when using it. Consider the points mentioned in its website:
- “This only works with AVM2 SWFs, so that’s Flash 9 player and higher with AS3
- It will only understand MovieClips on the timeline (no buttons!) and they must be exported for ActionScript for the filenames to be correct (this is easy enough to do with a few clicks in the Flash IDE).
- The program is memory-intensive. A bitmap is created for each frame of the SWF and held in memory until the files have been written (it was designed this way to facilitate cropping and quick development; it’s not intended as an export utility for your ten minute animations!)
- Timeline code that causes clips to loop infinitely will also cause the rendering to loop infinitely.
- Other stuff, probably”
Step 4: Download it!
Now that you know about it, it’s time to go get it!
At this time the tool doesn’t have an official website but it’s hosted on the MarshGames site. You can also download the source code in case you want to improve the application.
Step 5: Test
Select an existing SWF file with previously created assets (make sure each has a class name) and open SWFToPNG. Press the Open and Convert button to browse for the file, click Select and prepare to witness the magic.
Take advantage of this application and reduce development time!
Thank you for reading!