This post outlines setting up FlashDevelop to a production-ready state. It covers:
- Java installation
- FlashDevelop installation
- Additional software installation
- Program settings
- Key bindings
- Panel layout
- Templates and snippets
- Version control
You can read the post, or just download this zip which contains a copy of my settings folder, and should be unzipped to:
Flash develop is pretty picky about its Java installation. You need the 32-bit (even on 64-bit Windows) Java 1.6 runtime, and you'll need to make sure some system variables are set. Running the right version will avoid all sorts of annoying compilation errors.
If you have old or conflicting versions of Java installed already, you may want to uninstall them:
- Uninstall all Java versions from Programs and features
- Clean User and System Environment Variables:
- Remove Java from PATH
- Delete the JAVA_HOME
- Check that the following 2 files do not have any references to old versions of Java
- C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\jvm.config
Next, install a fresh copy of Java:
- Install 32 bit Java 1.6, Update 30 (just the file named jre-6u30-windows-i586.exe - not the JDK)
- In your Windows Environment Variables dialog, under User or System variables:
- Set JAVA_HOME to point to the root folder of your java install, in my case "C:\Program Files (x86)\Java\jre6"
- Add the folder of the Java executable file to your PATH, in my case "C:\Program Files (x86)\Java\jre6\bin" (make sure that the extra \bin is included!)
- Restart your machine
Additional plugins can be found on the plugins page.
Additional software installation
FD manages the installation of additional software, via its Tools > Install Software… menu. For debugging, install:
- Flex SDK
- Flash Player (SA, NS, AX)
If the Flash Player installer won't let you install the supplied versions, get the latest from the Adobe downloads page.
From Tools > Program Settings… change the following:
- FlashDevelop > Display > UI console font: Consolas 8pt
- ASCompletion > Generate protected declarations : true
- BasicCompletion > Disable auto completion : true
- FlashViewer > External player path : ensure it points to your SA debug layer at F:\Users\<user>\AppData\Local\FlashDevelop\Apps\flashsa\14.0.0\flashplayer_14_sa_debug.exe
From Tools > Keyboard Shortcuts… change the following:
- EditMenu.MoveLineDown : Ctrl+Down
- EditMenu.MoveLineUp : Ctrl+Up
Making the most of your screen real estate is critical with FD, especially when the layout will switch automatically in Debug mode. Generally, you want to show:
- Authoring: Code, Outline, Project, Results, Output
- Debugging: Code, Results, Output, Stack, Locals
Templates and snippets
Having a few decent core templates and customized snippets makes for tidier projects.
For Templates, I have:
- Document – a base class that extends Sprite, sets up the stage,
- Element – a base class that extends Sprite
- Quick Build File – a file that can be built and run with CTRL+F8
For Snippets, I change:
- Events, so event:Event is the single parameter
- Case, so that breaks are indented
- Accessors, so that get and set are cuddled, and get is on one line
Add buttons to kill the debugger (which will refuse to close and release its process a lot during debugging) to your FD toolbar.
Copy the ToolBar.xml file from your installation folder to your user settings folder:
From: C:\Program Files (x86)\Development\FlashDevelop\Settings\ToolBar.xml To: C:\Users\<user>\AppData\Local\FlashDevelop\Settings\ToolBar.xml
Then add these lines:
<separator /> <button label="Kill FlashPlayer" click="RunProcess" tag="taskkill.exe;/f /t /im FlashPlayerDebugger.exe" image="111" /> <button label="Kill FlashPlayer" click="RunProcess" tag="taskkill.exe;/f /t /im flashplayer_14_sa_debug.exe" image="111" />
Set your source control tool to ignore the /obj folder in each of your projects.