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.

Staff

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

 

Batch image exporting from .fla

| No Comments

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).

_ExportImages.jsfl
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.

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

_ExportImages.jsfl
Download Demo Files

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

使い方

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

あとAdobeのリファレンスにいろんな方法でコマンド(.jsfl)を走らせる方法が書いてあります(一応です)
Running JSFL files (Adobe Livedocs)

超簡単なわりにわりと重宝したのでもし良ければという感じです。(とはいえjsflはしくじるとこわいのでどうぞ前もってお試しの上使ってください。。)

Leave a comment