If you’ve been following this tutorial series thus far, this might be the tutorial you’ve been waiting for. The ability to load a SWF into the Flash Professional interface is definitely one of the coolest aspects of Flash extensibility. There are 2 distinct advantages to building a Flash panel:
- Endless visual possibilities
- The power of ActionScript
The 1st advantage should be fairly obvious to anyone familiar with Flash’s design and animation capabilities. The 2nd advantage may be slightly less obvious, since ActionScript and JSFL can appear so similar, but ActionScript (3, specifically) has a whole host of capabilities that JSFL does not (network connectivity, timed events, and the ability to interface with nearly any file type using ByteArray, to name a few). The topic of exploiting ActionScript capabilities in a panel actually deserves its own blog post, but for now it’s sufficient to say that SWF panels make cool stuff possible.
This tutorial will serve as a primer, getting you started on the basics of how to load your panel into the Flash interface and how to communicate with JSFL through your SWF.
The ability to include user interaction into a JSFL script can provide a significant level of flexibility and feedback. Flexibility and feedback are especially useful when you plan to distribute your extension to others. Flexibility allows the script to run differently depending on current conditions. Is there a document open? Are items selected in the Library? Etc. If so, you can ask the user how to proceed. Feedback lets the user know that the script has run properly (or not), so that he/she can proceed with confidence. This tutorial will cover the primary types of user interaction available in JSFL.
Part of being a solid Flash user and a good collaborator is maintaining clean, navigable files. This means naming layers and library items clearly, deleting unused material, keeping folders organized, etc. Because these actions must be applied to all files and are quite repetitive, they’re good candidates for automation. You can use JSFL to script all of these actions into a single keystroke or mouse click. This tutorial will focus on creating a Command (saving a Command is explained in the first tutorial) that will clean up the items in the Library.
The ability to create extensions is one of my favorite features in Flash Pro. You can extend Flash to include new features and automation in the form of Commands, Panels, and Tools. This series of tutorials will show you how to create your own extensions for Flash. There is a special scripting language that allows you to control Flash, and it is known as JSFL.