Frame and Layer Distribution

Sometimes you need to do something but it just isn’t available in the program you’re using. It used to be that in this situation I’d just sigh and do it manually, wishing under my breath that the programmers had included a few more features. Then along came scripting languages.

At some point during my first Flash animation job I discovered the wonderfulness of JSFL commands. They let you do lots of cool stuff. It’s just a matter of deciding whether the time it takes to script the solution is, in the long run, a time saver or a waste of effort. I’ll admit that I’ve created a few Flash commands that were really overkill, and that I may never break even on time spent making the tool versus how long it takes to just do the thing manually.

My boss from that first job contacted me yesterday and asked if I could make a tool for him. He had one that had worked fine in his previous install but he recently upgraded to Flash CS4. He had been the longest holdout I know on Flash MX 2004, a version that came out in (you guessed it) 2004, and still has certain things going for it.

Anyway, it turned out I was able to help him get his old tool working in CS4, so I didn’t actually need to write a new one. By the time I discovered this, though, I had already finished writing about 3/4 of a new version of the tool, so I ended up just finishing it for myself. It fills in a gap in my toolset, anyway, so it’s a good thing to have.

I’m going to introduce that tool today, along with several others that are kind of in the same category. They are distribution tools. They all take symbols or frames or layers and distribute them to separate frames or separate layers. Flash actually has a built-in one of these: “distribute to layers”. That one simply takes all the selected elements and puts each one on a new, otherwise empty layer. It’s useful if you’ve created a bunch of symbols on one layer but need them on separate layers in order to animate.

There are several of these, so I’m just going to present them in list form.

  1. Distribute frames to layers

    Takes the selected frames and puts each one on its own new layer. This is the command I semi-unnecessarily created yesterday.

  2. Distribute to existing layers

    Like the built-in “distribute to layers” function, except this time it will try to distribute the symbols to layers that already exist, and keep them in the same frame range. It will only create new layers if there aren’t enough already for the distribution.

    This command is useful if you’ve done some animation on a single layer but then realize you need the symbols on separate layers. You can go through and apply this command to each frame and it’ll distribute all the symbols onto the same set of layers.

  3. Distribute to frames

    Takes all the selected symbols and puts each one in a keyframe by itself, all in the same layer. Sometimes it’s easier to create your animation keys all on the same frame, and this lets you splay them out across frames once you’re done.

  4. Distribute to layers on current frames

    Just like the built-in command, except that instead of creating a keyframe on frame 1 of the new layers, it creates a keyframe on the same frame as where the distributed elements are coming from. Thus the stage still looks the same in that range of frames, it’s just that now those symbols are each on their own layer. I find this one to be an improvement over the built-in “distribute to layers”, since I almost always want the distributed elements to maintain their original position in time.

Download

Since these tools are all related I’ve packaged them as a single download. Enjoy!

Distribution Commands

2 thoughts on “Frame and Layer Distribution

  1. CryptKicker says:

    Thank you so much for creating this updated batch of commands. Why Adobe couldn’t have implemented a Distribute to Frames years ago is beyond comprehension. Thanks for still having this up for the diehards.

  2. Colin Cove says:

    Very helpful commands. Distribute to frames was a life saver.

Leave a Reply

Your email address will not be published. Required fields are marked *