Flash JSFL Commands: Fun with Transforms

Usually, the tools that Flash provides natively are sufficient for dealing with transforms (the details of a symbol’s position, rotation, skew, and scale).  Sometimes, though, you need a little more.  I’m going to introduce two tools today that provide more flexibility in resetting symbols back to their default transform.

Reset Transform (improved)

When you hit ctrl-shift-Z in Flash it’ll reset the transform of all the selected symbols back to their default state.  That means 100% scale, with no rotation or skew.  But what if you want the default scale/rotation/skew to be something different?  Wouldn’t it be nice if you could define an arbitrary transform that you wanted ctrl-shift-Z to reset a symbol back to?

As you may have guessed, I’ve created just such a thing. It includes two Flash commands.

  1. The first creates a reference symbol that has your definitions of your symbols’ default state.  All you have to do is put all your symbols on the stage in the position you’d like them to be in by default and call Commands->Create symbol scale reference. That creates a symbol in your library called _symbol_scale_reference in which all your symbols you had selected now reside, defining their default transform.
  2. The is the command that does the resetting.  It simply takes the selected symbols and changes their transforms to match whatever is in _symbol_scale_reference.  If the reference symbol doesn’t exist then the command’s operation is identical to the standard Reset Transform command. I recommend switching your ctrl-shift-Z keyboard shortcut over to this command, since it’s functionally the same as the original Reset Transform but with the added functionality if you want it.

download_iconReset transform (improved) installer

Zero Transform

But that’s not all!  I have another even cooler extension for you today!

One of the functions that I sorely missed for years in Flash was Zero Transform.  That’s a function that takes the current state of a symbol instance and makes it the zero point in the transform.  That is, after zeroing a transform, your selected symbol won’t have changed in appearance but its transform will now be 100% scale with 0 rotation and skew. Any 3d animation program worth its salt has this functionality, so why doesn’t Flash?

It took some doing, but I managed to write a Zero Transform command for Flash.  I use it all the time, and I think you may find it useful too.

Included are two commands: Zero transform as is and Zero transform at scale. The first is exactly as I described above, and the one I find most useful.  The second does something very similar, except that instead of resetting the transform so that it ends up at 100% scale, it does it so that it ends up an arbitrary X and Y scales that you specify.

I use Zero transform as is enough that I have it bound to an easy-to-remember keyboard shortcut: ctrl-alt-Z. I think of it as a more authoritative version of ctrl-shift-Z.

download_iconZero Transform installer

3 thoughts on “Flash JSFL Commands: Fun with Transforms

  1. Logan Bender says:

    Zero Transform rocks! thank you.

  2. Quakeboy says:

    I am planning to make Zero transform compatible with Flash CC 2014, Can you share the source code for it ?

  3. anonymous says:

    While it’s been a year, other people might like to know that the extension is in fact compatible with CC, but the mxp package has to be converted through Adobe Extension Manager CS6.

Leave a Reply to Logan Bender Cancel reply

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