BIT-101 [2003-2017]

Want to help on a very cool open source project?


Last week I posted a [Library Manager Extension][1] I was working on. As I got into improving it, I saw that there was a whole lot you could do with it. There are so many properties and methods of the Library and Item objects. The problem was that from a WindowSWF, you have to make these repeated calls to MMExecute, passing in strings that represent JSFL statements. It gets really complex when you are trying to pass in string or other variable types as arguments. I constantly got baffled with my single quotes, double quotes, escaped quotes, escaped escapes…blah!

So I started creating a wrapper class. With this, I could just call a method of the class with whatever argument I wanted. The class took care of escaping everyting as needed, and calling the MMExecute function with a correctly formed string.

I have now created a Library class and an Item class that handle 99% of the JSFL Library and Item methods and properties. It is essentially like programming in JSFL, but in ActionScript. Here’s some example code:

import JSFLTools.*;

var items:Array = Library.items;
var numItems:Number = items.length;
for(var i=0; i

This traces out the names of all the items in the library. Realize that this is ACTIONSCRIPT in a WindowSWF, on the timeline, not JSFL. It gives you direct access to the library and all items in it, directly from AS! This will make developing custom panels at least 20 times easier.

I'd like to do a whole lot more with this, including the fl object, document, timeline, etc. Could potentially wrap most of JSFL in AS2 classes. If anyone wants to help, I would be happy to accept your text editing skills! It's largely cut and paste work, with some judgement. Also need some beta testers. Get in touch.

[1]: https://www.bit-101.com/blog/archives/000051.html
« Previous Post
Next Post »