About the Site

This weblog is edited and run by members of reallyenglish, a company offering a total English learning solution based in London, Beijing, Shanghai and Tokyo. Visit our corporate site to know more about what we do.

Notes are posted by members from various cultural and geographical backgrounds, and the topics range from education, business and international communication to software development, the internet culture, and more.


Masatomo Nakano http://twitter.com/masatomon /m/mt-static/support/assets_c/userpics/userpic-2-100x100.png simonl davida jeremyw Go Kameda gavin b No name tomoyukis


Recent Comments

  • Go Kameda: Glad to hear that - im afraid i cannot really read more
  • Jessica: Genius. Thank you so very much. You have no idea read more
  • Go Kameda: Hi Jessica, yes it's possible - i have created simple read more
  • Jessica : I am trying to figure out if this script can read more

Batch image exporting from .fla


Just wanted to post a small .jsfl code snippet to export .png images from each frames in the current timeline (with the currenrt .png export settings).

Download Demo Files

Although the same is possible by "Export" -> "Export Movie..." then choosing "png sequence" as the file format, jsfl can be more flexible as;

  1. It can export images from any (current) timeline
    Correction: It is also possible from "Export Movie", sorry for my ignorance.. orz
  2. It can possibly perform more complex batch processing (with a bit of code modification)
  3. The direct keyboard shortcut (with no dialog) can be assigned to it

Basic Usage

  1. Open the .fla from which you want to export the image (In the Demo, it is "ExportImagesTest.fla").
  2. From the menu, "Commands" -> "Run Command..." and open "_ExportImages.jsfl".

And, here is the Adobe Reference for how to run .jsfl in different ways;
Running JSFL files (Adobe Livedocs)

The image file names or location can be easily modified by editing the line with the comment. It saved me quite a lot of time so hopefully it could help be some help for any of you in any way.

Additional Note (1, June, 2011)

Added a simple example that exports .png files from multiple .fla files in a specified directory (tested on Flash CS4 / CS5.5 on Mac OSX 10.6)

Download Demo Files

現在開いている.flaの各フレームから連番で.pngを書き出す超シンプルな.jsflスニペット、メモとして一応あげておきますね(Flash CS3とCS4で動作確認)。

Download Demo Files

実際"Export" -> "Export Movie"から.pngを連番で書き出せばいい話なのですが、jsflでならどのタイムラインからでも書き出せたり(Export Movieでもできました、知らなかったorz)、名前のコントロールが柔軟だったり、ダイアログなしで一発で終わるようにショートカットをあてがえたり、より複雑なバッチ処理にも使えたりするのがいいんじゃないかと思います。


  1. イメージ書き出し元の.flaを開く(デモでは "ExportImagesTest.fla")。
  2. "コマンド" -> "コマンドの実行"を選び、"_ExportImages.jsfl"を開く。

Running JSFL files (Adobe Livedocs)


追記 (1, June, 2011)

指定したディレクトリにある複数の.flaから.pngファイルをExportする.jsflのサンプルを追加しました (tested on Flash CS4 / CS5.5 on Mac OSX 10.6)

Download Demo Files


I am trying to figure out if this script can be adjusted to work for my purposes. You will have to forgive my ignorance in these sorts of things, but I NOT a programmer.

I am working at a animation company who deals in flash. For a given episode I have around 300-500 individual flash files (one for each scene). Our workflow has us exporting PNG sequences for every file. This normally takes me days and days. It is very time consuming. I want to find or create some sort of script that would help me batch export all of the files at once or at the very least have it automated down to a single keystroke for each.

Would it be possible to point this script at a folder and have it render a whole bunch of files at once? Putting each PNG seq for each file in a its own folder?

I really appreciate any advice in this area. Like I said I fairly programming illiterate, but I feel like this could really help me.

Hi Jessica, yes it's possible - i have created simple .jsfl (and test files) to batch-export .png files from .fla files in a specified directory (added them on this entry as well).


Demo Files (.zip)

How to use:
Unzip the demo file and run _ExportImagesEX.jsfl on ExportImagesEXTest directory (or any directory which has some .fla files in it). It is strongly recommended that you back-up your files before you do this, so that you don't lose your important files by accident.

This may not be exactly what you want, but hopefully this helps you to have an idea of what's possible with .jsfl files.

As for how to make use of .jsfl files, or how to assign keyboard shortcut to the newly created command, i found the following Adobe documentation very helpful.


Genius. Thank you so very much. You have no idea how much this really does for me. I can't thank you enough. I will try to expand my knowledge of .jsfl files based on this.

It looks to me like it exports a single PNG for each frame and repeats that process for all frames, although it is conceptually the same Flash's built in PNG sequence export, it seems to be a slower process. It runs really fast on the demo files, but on a complex scene with 100 or more frames and dozens of layers, it goes rather slowly.

The other issue it causes with its single frames export repetition, is that you can't cancel the process mid way through. You can only cancel individual frame exports which if you are of a long export, it would be an issue.

I will attempt to amend it to do a sequence output instead.

I really appreciate this as a building block.It functions well as is and I am eager to see it I can improve on it.


Glad to hear that - im afraid i cannot really think of effective solutions for the problems you pointed out but just thought that keeping the number of files you process at once relatively smaller 'could' make a difference.

From my experience, i felt that that this kind of operation has some sort of 'threshold' for tasks it can handle at once and when you try to process more than that things suddenly start to get slower or crankier (for instance, everything was swell when you processed 30 files, but once you do the same for 35 files it is extremely slow - something like that.)

Though it depends on factors such as machine specs or complexity of the .fla files, having a rough idea of amount of the tasks (number of .flas in this case) at which it can operate most efficiently at once might help your productivity (i hope).

..Or, of course it would be awesome if you can customise or improve the script so that it meets your needs - good luck..!

Leave a comment