Installing AS3 and Flex Bundle for Textmate

I am totally not a coding guru just yet, but I have my eyes on the prise and I hope to one day know my stuff, but for now I will admit that I have a little trouble understanding some simple tasks that most programmers would not have any trouble with. We all know and love Textmate. The great text editor for the Mac. Heck I even use it to write my blog posts. You have to check out the blogging bundle if you have not used it for that it is great. As soon as I got Textmate I started using it for all my actionscript. At the time the bundle was only for AS2. Now that I am starting to dig into AS3 and Flex it would be great to start coding using this editor. It launches way faster than Flex Builder or Eclips. There are some draw backs. The biggest being that you do not get the code hinting quite as much as you do with Flex Builder, but still it is a great tool to work in. In the next few steps I will show you how to install SVN (subversion) client for your Mac so you can utilize all the bundles and updates that are currently being developed for Textmate and most importantly there is an AS3 / Flex bundle that you can download.

Step 1: If you already have an SVN client that allows your mac to use the terminal command line to access SVN builds then you are a step ahead. If not you will need to go to http://metissian.com/projects/macosx/subversion/

This will install a package on your Mac that will give you terminal access to SVN commands. Basically you are going to be telling your mac to go to a web address and download the latest builds of the textmate bundle for AS3 and Flex. Step 2: After you have downloaded and installed the SVN client you will need to open up terminal on your mac. This is usually located in your Applications> Utilities folder. Once you have opened up terminal you will need to run a set of commands that will allow your mac to search out the directories for the Textmate builds for AS3 / Flex. The commands will create a folder for each build and download them in to the proper directory on your Mac. Once they have been successfully downloaded Textmate should open if it is not already and you should be able to go to the bundle menu and see that you have a new option for Flex and a new option for Actionscript 3. Here is the code that you will need to copy and past into terminal to get the job done. mkdir -p /Library/Application Support/TextMate/Bundles cd /Library/Application Support/TextMate/Bundles export LC_CTYPE=en_US.UTF-8 echo “… update Flex bundle” svn co http://macromates.com/svn/Bundles/trunk/Review/Bundles/Flex.tmbundle echo “… update As3 bundle” svn co http://macromates.com/svn/Bundles/trunk/Review/Bundles/ActionScript 3.tmbundle osascript -e ‘tell app “TextMate” to reload bundles’

Step 3: I guess if you have not downloaded the Flex SDK then you may need to do that. Maybe this should have been step one? Anyway, the flex SDK is opensource and free to download from Adobe. The bundles for textmate that you just installed will allow you to used the command line compiler that is built into the Flex SDK so that you can publish and debug your projects. For more infrmation on how the command line compiler works you can check out the documentation here. Where do you put the SDK after you install it? You Ask? Well I had installed the apple developer tools on my computer so in the main drive directory I have a folder called Developer and I put my flex SDK in the SDKs folder. Structure should look like this. Main Drive>Developer>SKDs>flex_sdk_2 I am pretty sure that the Flex and AS3 bundles are set up to look for that directory for the sdk when it used the command line to compile your applications. If you need any further support you can always check out the bundle development support pages located here. In Summery: Now what is so cool about this? Well first off if you want to get started developing Flex apps and you don’t want to shell out the money for Flex Builder This will give you all the tools you need to start building AS3 and Flex apps right away and the only money you are out is the money you spend on your TextMate Licensing fee. The second reason for doing this is, well, it’s textmate man! What is cooler than developing Flex apps using this great tool. On top of that you will find that textmate has support for many other programming languages and I am sure that a lot of you are more than just Flex programmers.