“No Frills” AS3 Development Environment: Ant, Editplus, MXMLC
As I have been exploring the ActionScript 3.0 language update I have used a couple of different approaches for publishing/compiling my applications. I’ve used both the Flash 9 Alpha and the Flex Builder Beta and they are both great. However for the past several years I have been using Editplus for AS1 and AS2 dev and really like it for code editing.
After digging around on the web I’ve taken bits and pieces from here and there to come up with a pretty lightweight development environment for AS3 that feels like home (to me anyway). I am currently using Ant to build the application. Ant then calls the mxmlc compiler and passes the info needed to compile. (Editplus can really be replaced with any code editor in this scenario.)
First you need to download and install the JDK. I’ll admit the JDK does have a large footprint but the JDK must be installed in order for Ant to work. Go ahead and download JDK 6 for now and follow the installation procedures. To make things easy just install the JDK to: C:\Program Files\Java\jdk1.6.0.
You can get the JDK here:
http://java.sun.com/javase/downloads/index.jsp
Next you need to set the JAVA_HOME environment variable. To add the JAVA_HOME environment variable to Windows (this is the path to wherever you installed the JDK) right click My Computer. Then go to the Advanced tab. Next click the Environment Variables button. Next click the New button (the one on the top). Now use “JAVA_HOME” for the Variable name and “C:\Program Files\Java\jdk1.6.0″ for the Variable value (or the path to wherever you installed the JDK). Here is a screen capture if you have issues: http://confluence.atlassian.com/display/DOC/Set+JAVA_HOME+variable+in+Windows
Now you need to download Ant if you don’t already have it installed. Basically just download Ant and then extract it to your C:\ drive. You should end up with a path like this: “C:\apache-ant-1.7.0″. (There is no real “install” type of screen or anything for Ant just to let you know.)
You can get Ant here: http://ant.apache.org
Now you need to set the ANT_HOME environment variable. (This is the same as when you added the JAVA_HOME environment variable.) To add the ANT_HOME environment variable to Windows (this is the path to wherever you extracted ANT) right click My Computer. Then go to the Advanced tab. Next click the Environment Variables button. Next click the New button (the one on the top). Now use “ANT_HOME” for the Variable name and “C:\apache-ant-1.7.0″ for the Variable value (or the path to wherever you extracted Ant).
At this point if you have done everything correctly and your system wants to play nice you should be able to use Ant. This has its own benefits but we’re just concerned with using it to call the mxmlc compiler for now.
Ok, now on to getting mxmlc on your system… From what I have read I believe you only need the Flex SDK to compile AS3 apps but for now we’ll get the whole Flex Builder just so that the environment you are building matches the one I have successfully gotten working. If you change the default installation directory be sure note where it is. Go ahead and download the Flex Builder from here:
https://www.adobe.com/cfusion/tdrc/index.cfm?loc=en%5Fus&product=flex
After the Flex Builder is installed you should be ready to start compiling AS3 applications using the Super Simple AS3 Application Template I have put together. Download that from here:
http://www.actionscriptcheatsheet.com/downloads/as3_0_app_template.zip
To compile this application template navigate to the directory where you extracted it using a DOS window (command prompt). Now you just have to type “ant” and hit the Enter key. Granted this app template isn’t anything great to look at but some of the core things you’ll need have been started, such as image loading, a simple progress bar and a simple debugger. (You can use Control+Shift+D to change the visibility of the debug console.)
I hope this helps saves time for some people. This is not meant to replace Flash 9 or Flex just another way to edit AS3 and compile your apps!
Please note this app template code is very simple at this point in time. It can certainly be improved upon, refactored and hopefully expanded.
3 comments3 Comments so far
Leave a reply


[...] Also, you’ll need the JDK, Ant, and MXMLC to use this app template…. See this post for basic setup instructions of these tools. http://actionscriptcheatsheet.com/blog/archives/19 [...]
[...] Ely Greenfield’s DisplayShelf and FlexBook Components were demonstrated. The attendees seemed pretty impressed by the FlexBook transparent Anatomy example. I asked if these were SWC files and James confirmed that they were. He also touched on MXMLC, COMPC, their differences, and uses. (Here is a COMPC example by Mike Chambers not mentioned in the session. Here is an MXMLC example I did, also not mentioned but useful.) [...]
thanks, i got some usefull information from you. i need some more info thats is can u help me on deloyment of my software