Flash IDE – Rename/renumber multiple instances on the timeline

I needed to re-number a whole bunch of instances on the stage today, so wrote a handy JSFL script to do so.  Feel free to use this script as-is where-is (I give no guarantee that it’ll work for you, and I’m not liable for any issues that may arise from it’s use).

Having got that out of the way, here is what it does:  Say you have a lot of instances that are named sequentially on the stage (such as obj7, obj8, obj9, obj10) etc, and then you decide to delete one out of the middle, or add one in to the middle.  Usually this then means manually renaming all other instances to create a new sequence.  if you have literally hundreds of these (like I did), that can be quite painstaking.

With this script you simply select the first and last instances on the stage to rename and select ‘Rename sequential stage objects’ from the ‘Command’ menu.  The instances all need to have the same instance name prefix (for example, all named ‘obj#’ where # is the number). You’ll be prompted to enter a number to start renaming from, and the script will make short work of the rest.

Tested with Adobe Flash Professional CS6, but theoretically it should work with versions from CS3 onward.

Note: it does NOT zero pad – but that’s a relatively simple change you can make 🙂

Here’s how to install it:

  1. Download Rename sequential stage objects JSFL file (zip) and unzip it
  2. Copy/move the .jsfl file to the Command folder for Flash (see below)
  3. The command is now available in the menu

Where to put the jsfl file (see Adobe site for latest info):

  • Windows 7: boot drive\Users\username\AppData\Local\Adobe\Flash CC\language\Configuration\
  • Windows Vista: boot drive\Users\username\Local Settings\Application Data\Adobe\Flash CC\language\Configuration\
  • Mac OS X: Macintosh HD/Users/username/Library/Application Support/Adobe/Flash CC/language/Configuration/