Category Archives: JSFL

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

Art Brushes Are Within My Grasp

Oh my goodness, I’m so close. You don’t even understand. For the last week or so I’ve been using all the spare time I could find to work on a new Flash command. It’s so complex that the source file is now more than 1000 lines. To put this in perspective, I’ve never seen any jsfl command that comes even close to this length, apart from my own autotweener. To put this further in perspective, this tool will do something that Flash has never been able to do, and for which I and many of my Flash animator friends have been clamoring as long as any of us has been using Flash.

Curious yet?  The tool that I’m working on will map arbitrary art onto an arbitrary path.  That means you can create “art brush” symbols and then apply them to any path and have the brush bend itself to follow the path.  For instance, if you’re animating a tiger with a wagging tail, you’d just animate a line, then apply your tiger tail art to your lines.  Boom, you’ve got a wagging, serpentine tiger tail.

I haven’t got the tool finished yet but I thought I’d put up an image to illustrate what I’m talking about.  The image below is from the Art Inspires blog (see the original post here).  It’s a screen capture from Adobe Illustrator, which has had this feature for a long time.  I’m kind of skeptical that I can make my art brushes look as good as Illustrator’s, and it will certainly be slower (since it’s written in Javascript), but either way it’s going to be awesome.  Seriously, this is sharks with frickin’ lasers territory.

Virtual animation disc

I mentioned in my last post that I was working on a new Flash command that several people had requested, and that I’d like to have myself.  It feels good to be able to help people out with stuff like this, particularly when it also helps me 🙂  Anyway, I thought I’d talk about it a little.

Several graphics programs, particularly ones that deal with animation, have a feature where you can rotate the canvas to an arbitrary angle, in the same manner as an animation disc.  It’s very useful when you can’t get quite the right curve to a line unless your drawing is positioned at a good angle.  Unfortunately, Flash won’t do that.

Continue reading

Flash JSFL Commands: The Autotweener

For the folks who aren’t Flash animators but would like to see a little bit of my process when animating, skip down and watch the movie that I link to below.  Starting at around 4 minutes in you can see an example of how I animate one of my characters in a simple motion.

Anyone who’s followed my blog so far and read the entries on Flash commands (not sure if there’s anyone like that yet – I have an admittedly small audience) will have seen me mention the Autotweener.  Well, today’s the day – I’m going to tell you all about it and post it for download.

The autotweener is a tool that does many of the same things as Flash’s built-in motion and shape tween functions, but it works in a fundamentally different way.  It’s incredibly useful, simplifying tasks that used to be difficult or impossible.  For my own animation process it was revolutionary – it totally changed how I do things.  I now rarely use motion tweens and even more rarely shape tweens – the autotweener has taken over almost all the tasks I used to use those for.

Continue reading

My JSFL Commands

So I’ve noticed a couple things.  First, most people who use Flash are either animators or programmers, but rarely both.  There are lots of animators who dabble in programming and lots of programmers who dabble in animation, but in my experience you’re likely to have much more passion about one than the other, leading to having much more skill and experience in that one as well.

The reason I mention this is that occasionally I think about how few people there are who produce decent JSFL commands.  I think it’s because the people who are really interested in Flash commands are the animators – particularly the professionals, who work in Flash every day.  It’s certainly true for me: I animate in Flash for 45 to 50 hours a week, and I frequently think of things that I wish Flash could do.  Earlier in my career, before I Knew the Way of the JSFL, I would just grumble to myself and go on working around that lack-of-feature or bug.  Unfortunately I think that’s what most Flash animators do, many of them not even being aware of the purpose of the Commands menu.

Continue reading