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.