Archive for November, 2009

Exporting Layers as Separate SWFs

Monday, November 16th, 2009

Here’s another JSFL tool I created. This one will save each layer  on the current timeline (there’s also an option to export selected layers) as a separate SWFs. I find this useful for doing a batch process of transparent PNGs into SWFs. I originally made this for my co-worker Evan who uses this to export layers of animation so that he can assemble them in After Effects and manipulate the layers independently (useful for doing things like depth of field, parallax, or setting up 3D scenes). The SWFs that are generated are named according to the layer name (e.g., “my-circle” layer is exported as “my-circle.swf”).

This is Flash CS4-only. Download the extension here and run with the Adobe Extension Manager to install. Restart Flash and run under Commands > Exporting > Export All Layers or Export Selected Layers. This tool is licensed under the MIT license.

Library and Layer Renamer Tool for Flash

Sunday, November 15th, 2009

I occasionally need to do a lot of renaming in Flash. For instance, you bring in a bunch of PNGs into Flash, distribute them to layers, but want to remove “.png” from their name on each layer. Or, maybe more practically,  you want to rename all your library class names from the package “com.domain.” to “com.anotherdomain.”. Well you’re in luck, because I just created a tool that does just that.

Library and Layer Renamer is a JSFL tool for Flash CS4 only. This tool has two functions (which can be found under the Commands > Utilities menu in Flash). First choose a selection type–for the Library Renamer, you can choose all items, only selected items, or build a selection based on a regular expression (e.g. to match all items with the string “.png” you would type in “\.png” in the text field below “Match Pattern”).

Next, if you’re using the Library Renamer, you can choose what to rename: the base class, the class name, or the library item name. For the Layer Renamer, only the layer name is affected.

Based on the selection, you can add a prefix, suffix, or do a pattern replace.  For instance, if you have five library items ["my clip", "my ball animation", "my graphic", "my button", and "my special something"] and you want to replace the word “my” with “sam’s” in each of those item names, the pattern would be “my” and the replace would be “sam’s”.

Where can you get this wonderful tool? You can download the latest from here. You can install this with the CS4 Extension Manager (a restart of Flash is required). This tool is licensed under the MIT license.

Library Renamer UI Screenshot

Layer Renamer UI Screenshot