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.



