JSFL to export all components as SWCs

I needed to export a bunch of components from a source FLA several times for testing. Doing this manually got tedious very quickly, so, I created a small JSFL script to loop through the library and export all components.

var rootDir = "file:///C|/Documents and Settings/Sam/" +
"Local Settings/Application Data/Macromedia/" +
"Flash MX 2004/en/Configuration/Components/" +
"B-Line Charting Components 3.0/";

var items = fl.getDocumentDOM().library.items;
var item;
var j=0;
for (var i=0; i

Just change the root dir and put in your command folder.

PrimalScript special pricing and new beta out

Sapien will be running a New Year’s Eve special on PrimalScript. As far as I know they wonÂ’t be advertising this anywhere but on the 31st of December from 9:00am till 11:59pm, pacific time, you will be able to purchase the download version PrimalScript 3.0 for $99. Before anyone asks, yeah it is the 3.0 release but you will get the 3.1 release for free once that is out of beta. They canÂ’t really sell beta software.

Also, a new build of PrimalScript is available. If you are using the beta you probably want to upgrade. Here is a list of changes in this the new build.
Continue reading

Separating ActionScript from MXML: Approach 5

Christophe Coenraets posted an entry on his blog demonstrating four different techniques to write a simple temperature converter application.

The purpose of the entry was specifically to demonstrate four different ways to accomplish the same thing–showing how flexible Flex really is. The goal for this application was to separate the ActionScript out of the MXML files.

I’d like to follow up on this entry and demonstrate a fifth approach. This is something one of the Flex engineers proposed earlier and in my opinion is the cleanest method. Instead of using an <mx:Script> tag and including functions that get dropped into the current class, we can create a Controller class and link it through tags. This keeps tags in MXML, ActionScript in external files, promotes OOP programming, and simplifies reuse.

Continue reading

The PrimalScript gold mine: lots of hidden gems

I’ve received a bunch of questions about PrimalScript since the public beta was release and most of them deal with just getting started. I thought I would prepare a short intro to PrimalScript that some people might find helpful.

PrimalScript is a fast and fully featured IDE. It supports many many languages, as such you may find some things in there that you may have no use for (A good example is the windows scripting features). After installation there is very little you will have to do to get PrimalScript working–it automatically adds the Flash MX 2004 help files and will detect the AS Class path.
Continue reading