Compiling Flex2 from FlashDevelop
April 20th, 2006
I mentioned in my last post that I’ve played around with Flex 2 and FlashDevelop. I wanted to briefly follow up on that by sharing what I added to my toolbar in FlashDevelop. There are a few posts on the FD forums which go over how to add your own toolbar or menu options which is super easy since they’re driven off of some xml files.
Assuming you already know what Ant is and you have it installed, you can easily create a build.xml file which will send off your mxml or actionscript to the Flex compiler, magically producing a finished Flex app. I wanted to add a shortcut to my toolbar in FD so that I didn’t have to keep an extra window open to run ant so I add the following to my ToolBar.xml file in FD:
<button label="ANT" click="RunProcessCaptured" image="23" tag="C:\windows\system32\cmd.exe;/k ant" />
Add it wherever you like, I just added it right next to the command prompt button which I basically just copied. All I added was the /k ant which tells the command prompt to run the command “ant” when it launches.
Update: I changed the above code snippet to reflect some input from Philippe. Now the output from the command prompt window is directed to the output panel in FD. You might have to change your path to cmd.exe, but most likely not.
Regarding the build file, I just copied the one Sam made and modified it for my own use.
If you want to copy mine to get started, here it is:
build.xml
The property name “source” refers the name of the mxml or as file you want to send to the compiler and “ext” is the extension, since you can send either an as file or an mxml.
FlashDevelop 2.0.0 RC2 released
April 18th, 2006
Over the weekend another release of FlashDevelop was announced. There were a few fixes, plus some new features:
* ActionScript/XML completion fixes
* Import statement auto-generation (new)
* ActionScript tree quick search (new)
* ActionScript tree display options (new)
* Improved search/replace dialogs
* Some general application fixes
* Improved colored printing
My favorite is the new auto-generation of import statements. For example, in your code if you were type the full path to a class such as mx.util.Delegate, the code would automatically change to just say Delegate and the import statement for mx.util.Delegate would be added to your class.
Looks like they’re getting close to an official 2.0 release, now if I can just get them to add some settings to point to my flex2 compiler so I can quickly work on some flex2 projects from within FlashDevelop. Currently I’ve just hacked the toolbar xml so that I have a new button which launches ant, which then just runs my build.xml file for the project I’m working on. I’d love to see an actual project type for flex2 and maybe a setting which points to the compiler just like the setting for mtasc.
Twisted Tea
April 12th, 2006
Somehow I missed this video on MTV…
http://youtube.com/watch?v=0Rue-3vI2PI
Connect Four a la Flex2
April 10th, 2006
Fellow co-worker Joe Berkovitz just launched his blog and what better way to introduce yourself to the blogosphere, but with a Flex2 game complete with source code! Some may have seen Joe at the last MAX conference where he talked about skinning and styling Flex apps. I recently just started a new position with Allurent where I’ll be working closely with Joe and since he’s not listed with MXNA yet I wanted to welcome him to the Flash blogging community by sending some people over his way.
Currently residing in Scituate, MA and working at