Currently the posts are filtered by: air
Reset this filter to see all posts.
exporting image sequences
If there is no reason to keep vector graphics in the swf, I normally replace them with Pngs. The flash player is faster in copying pixels than in drawing curves and lines. So, this brings mostly a better performance. But there are two drawbacks in the flash IDE.
- The export function just animates the main time line. All embedded MCs are standing on their first frame. This results in the fact that you can't export nested animations.
- If parts of the animation are controlled by Actionscript, this parts wont be exported at all.
That was exactly my problem today. And fortunately last week end I started to work with AIR. And in Air2beta you even have the possibility to exit the application after all your work is done. So the logical consequence was to write a pseudo command line tool that creates a proper image sequence of PNGs.(That's why I love to be a programmer, you simply make your solutions.) I call it a pseudo command line tool because you call it from the command line, but air apps are GUI apps, even if you don't need it like in this case.
It's really simple to use: You give it a swf file, an output folder, the size of the images and if you want a name prefix.
This is how a call looks like:
swf2imgseq.exe -if c:\temp\test.swf -of c:\temp\ -width 640 -height 480 -prefix img
I needed that tool quickly to continue with my work, so I didn't take time to implement error checkings.
That means you have:
- to give a proper file path
- the out folder has to end with an slash
- width and height has to be int values
- prefix gets a part of the file name, so your OS gives you some rules about it.
I don't know how the program behaves in case of wrong parameters.
You don't get any warranties and you use it on your own risk.
By the way: I have seen this last week end and I didn't know that. If you install an air app, it will be converted to an .exe file automatically.
download: swf2imgseq.zip


