JSFL 3: Document Path and URI

In JSFL, there’s two different reference systems – the directory structure and the URI structure. In the documentation, if you want the currently open file’s location they say you can reference

fl.getDocumentDOM().path

this gives you the directory structure. There, however, is no mention of how to get the URI. Some people have built clever find and replace scripts, but there’s an undocumented attribute called

fl.getDocumentDOM().pathURI

that gives you the URI as needed. Hope this helps someone!

JSFL 2: Making a Panel

Making a panel in Flash is rather easy, once you find the little bit of information you need. Panels in Flash are just swfs that happen to be in a specific directory.

Windows® 2000 or Windows® XP:
boot drive\Documents and Settings\user\Local Settings\Application Data\Adobe\Flash CS3\language\Configuration\WindowSWF

Mac OS® X:
Macintosh HD/Users/userName/Library/Application Support/Adobe/Flash CS3/language/Configuration/WindowSWF

drop your swf in there, and it should be available in the Windows>Other Panels menu.

JSFL 1: Hello World

I’m embarking on learning JSFL, and if you’re looking to learn it, too, maybe my path will help you.

First thing’s first: A hello world example:
create a new, empty file on your computer called helloworld.jsfl and put this in it.

alert("hello world");

Open the Flash IDE and choose Run Command from the Commands menu. Point to your new JSFL file and viola, an alert, as expected.