My first steps with JSFL

January 15th, 2007 § 2 comments

I’ve started playing with JSFL, which is JavaScript for the FLash IDE. More specifically, I’m creating a custom panel that I hope will make hierarchical animation easier to do on the timeline (at least the way I do it).

Unfortunately, it doesn’t really seem possible to make a panel that updates itself when the selection in the IDE changes (the way the built-in panels do), at least not elegantly or reliably. I suppose it is possible, by having the panel constantly poll the state of the selection, but that seems like a waste of resources, and at least one person out there seems to be having problems with that technique, although I haven’t tried it myself in Flash 8 (looks like the bug still existed in 7.2). I may try it that way anyway…

What I really want are events that my panel can respond to: selection changes, elements being moved, etc.

Another issue I’ve run into: when setting an element’s transformation matrix, the element moves as expected, but the transformation point doesn’t move with it! This leads to some really strange tweening unless you manually reset the transformation point (I just double-click on it with the Free Transform Tool). This will make my panel a real pain to use.

Hmmm… doing some snooping around, it looks like it is possible to change the transformation point using the document.setTransformationPoint() method. However, it only affects the selected elements, which means my code will have to select each element in order to fix it up. Rather messy, but if it works…

§ 2 Responses to My first steps with JSFL"

  • David Hammer says:

    I was curious if you ever got this tool working? It would be very handy to me in my current project…I have a tool that automates resetting the transformation point to the registration point, which is what I want, but it doesn’t automate selecting all the elements, so I have to turn on edit multiple frames, select “onion all” and then select all the elements by hand and run the script. Just curious if you got it working and ever made it available?

    I’m an animator, not a programmer, wish I could write my own tools, as I have need of a few to speed up workflow in our pipeline, but we’re a startup and don’t have the time to spend learning programming flash tools as of now…any help would be greatly appreciated :) if not, no worries



  • bunnyhero says:

    I never did get it working, unfortunately.

What's this?

You are currently reading My first steps with JSFL at bunnyhero dev.