TextMate ActionScript 3 and Flex Bundles
October 30th, 2007
As a Flash developer who’s been working with Flex and ActionScript 3 since late last year I really couldn’t bring myself to use the Flex Builder Eclipse plug-in. This down to my addiction to TextMate, in my opionion it simply out classes the competion. As a result I’m responsible for TextMate’s ActionScript 3 and Flex bundles.
At the moment the bundles are in the review section of the TextMate Repository. Once installed the bundle help covers how to set up (primarily to download the flex sdk) and outlines the non-obvious commands.
The main highlights of the bundles are:
Thanks to the following people who have all had a hand, although they may not know it, in the creation of the bundles:
For those of you who don’t use subversion the following zip’s can be downloaded, but they won’t necessarily be the latest version :

November 7th, 2007 at 10:05 pm
Could you create a zip file or sth similar instead of this subversion respository? It would be much easier to download.
November 13th, 2007 at 5:13 pm
Thanks for working on the Actionscript 3 bundle for Textmate! It sounds great. I have a request though. You have a few filenames in the bundle that are giving me difficulties when I’m trying to download. I’m using E-TextEditor on Windows and some files like “Getter:Setter” are not valid (I also saw a file that has a question mark in it). E-TextEditor is a great editor that works off the textmate bundle system. Most everything is compatable that I have worked with from Textmate to E. Would you mind changing these few filenames to keep compatability issues minimal?
November 14th, 2007 at 3:10 pm
I bought me a small Ruby book and startet do develop a completition-command that shows properties/methods of self-written classes in a popup on dot+tab
short demo:
http://screencast.com/t/JFxSYbzp
download:
http://www.bewegtbildgestalter.de/index.php?s=file_download&id=20
[put the instrinsic-classes-folder in Users/Shared/]
November 20th, 2007 at 10:32 am
tnx !
1 question and 1 correction
q : I have a script which used to invoke the shell-script in the bundle to update as 3 library’s. But i yesterday discovered that this script is no more available. And I have no old as3-bundle copy anymore. Could you send me the script, so I can rewrite my script and publish it.
c : my website is now http://www.4d.be instead of http://4d.ratubagus.net .
tnx and keep on doing the good stuff !!
Joachim
November 22nd, 2007 at 10:35 pm
Marcin - The only way to get the most up to date version of the bundles is via the repository, however I’ve added zips for download:
ActionScript 3
Flex
Chad - The filenames have been changed so they’re fine to use on a PC.
Christoph - Nice Work !
November 28th, 2007 at 9:50 pm
I love this bundle! It Rocks!
with the new revision, I am getting “parse_mxmlc_out.rb:31:in `+’: can’t convert nil into String (TypeError)” when compiling. I believe it occurs when there are errors and they are trying to be displayed.
Any help is appreciated.
December 8th, 2007 at 2:51 pm
I did some Ruby learning last night and came up with an Eclipse-like Organize Imports command. Works for all .as files in the current TextMate project, so in this version it is necessary to drag the intrinsic classes to the project window.
The code is no doubt ugly as hell but let me know if you’d like to see it nevertheless.
December 10th, 2007 at 12:45 pm
Jeff - Glad you like the bundle! I can’t recreate the problem you’re getting, I expect there’s a regex problem formatting mxmlc output. Until I work it out it’s possible to revert back to the previous python script by finding the following line in the build command:
-optimize=true 2>&1 | parse_mxmlc_out.rb;and changing it to:
-optimize=true 2>&1 | parse_mxmlc_out.py;December 22nd, 2007 at 11:36 pm
It’s amazing: I’ve just uploaded a little bundle (FlexMate) I’m using, and then I found this post.
I’d like to use it - my Bundle can’t compete - but the current AS3 bundle here (downloaded by SVN) raises some issues for my usage style…
1. It sets a too high bar to start. It expects a saved project. Why? Mine just takes the current “project” and assumes it’s correct. It still makes some assumptions, but I shouldn’t have to make a project in order to compile MXMLC (I’m compiling directly AS files to SWF). I think you should allow “compile with assumptions” without a project (and giving errors, if anything is wrong) and allow customization if you’ll save one.
2. It doesn’t integrate with the FDB debugger. I’ve a task called “Make & Debug”, that spawns a Terminal window and runs FDB from there. I’ve found the Debug menu, but it doesn’t help (I can’t manage to get it working - maybe because I’m using Tiger?).
3. I don’t know since I can’t run it without creating a project (I can’t atm), but reading the Help: why didn’t you execute the TextMate builtin script in order to load the PATH environment? Again, I shouldn’t have to set another variable to do that, or use predefined directories.
I was really excited whan I found it, but at the moment it seems to me filled with usability issues. It doesn’t “just work”.
I might help, at least adding the two features I’ve developed for my own use… and maybe working out those issues… since I’m sure that those problems are there in order to give more power to the Bundle, but they’re also limiting the ease of use. I think that everything could be perfect for everyone.
Please, take anything you need from the very humble bundle I’ve linked above, and don’t hesitate to contact me if you want to collaborate.
December 23rd, 2007 at 6:40 pm
Folletto - Thank you for the feedback and I’m glad you found the bundle. As it’s still in review by the TextMate community I’m more than happy to make changes that make it easy to use and understand. In response to your points:
1. Did you see the “Compile Current Class…” command? It should do what you need as it operates on the current file and isn’t project dependent.
2. You’re right! It doesn’t, and it should. I’ve been looking at your bundle for inspiration on this…. and hope to add something soon.
3. The majority of the bundle commands do use the $PATH if it’s been set, the main exception is the documentation command as the doc’s aren’t found in the bin. The point of using the predefined directories was to try and solve the “where’s the flex sdk” question before getting the user involved.
The main point of interest to me with your bundle is that you’re using the ScriptMate style approach. One of my TODO’s is to try and get this working interactively with fcsh - rather than running it “blind” through the Terminal or iTerm.
Cool stuff!
January 1st, 2008 at 9:28 pm
I just downloaded and installed the bundle on TextMate. But I can’t set the path for the main classes.
I’ve read the help and set a shell variable but it doesn’t work. Any ideas?
feel free to reply via mail!
January 2nd, 2008 at 2:32 am
Hey Simon,
I really love this bundle!
It works great, except for one thing. Whenever I attempt to build something, iTerm crashes on me, so I have to go to do my building manually right now. I’m using the latest version of the bundle from the macromates SVN repo. Have you seen this happen? Any suggestions?
Thanks,
William
January 2nd, 2008 at 3:21 am
Seems as though it is some issue with the applescript related to iTerm. BTW, I’m running 10.4. I just edited out the call to the fcsh build scripts and it’s working fine. It looks like you get a lot of pretty useful info from fcsh, however, so I’m looking forward to using this when I switch over to 10.5.
BTW, does this hook in the the flash debugger version at all, and it what ways?
January 5th, 2008 at 6:20 pm
Danilo - As long as you have set the TM_FLEX_FILE_SPECS shell variable correctly you shouldn’t have any problems. The best way to see how to set up a project is to create one using File > New from Template > ActionScript 3 > Project - ActionScript 3.
William - I know I haven’t kept up to date with the latest iTerm builds so that may be the cause of the problems. I’m now working from Leopard and Apple have improved the terminal enough to use it instead. FCSH is a great time saver, especially on large projects, but other than that it is simply a wrapper for mxmlc.
There’s work in progress regarding running fcsh inside TextMate, along with launching FDB.
January 8th, 2008 at 10:42 pm
I get the following error when trying to svn co this bundle:
subversion/libsvn_subr/utf.c:466: (apr_err=22)
svn: Can’t convert string from ‘UTF-8′ to native encoding:
subversion/libsvn_subr/utf.c:464: (apr_err=22)
svn: ActionScript 3.tmbundle/Commands/Insert Color?\226?\128?\166.tmCommand
Seems like you have used an ellipsis (…) instead of three underscores in the file name, and this is preventing me from checking out the bundle with svn.
January 9th, 2008 at 11:17 am
Travholt:
This should solve the problem. Specifically: 5.7.2 Setting LC_CTYPE
January 12th, 2008 at 7:26 pm
Yup, that was it. Actually I think I once did the same thing on my other computer, but that was ages ago … Anyway, thanks!
March 3rd, 2008 at 7:39 pm
With a clean install of TextMate + AS3Bundle on a clean install of Mac OS 10.5.2 … I get this prompt whenever I try to launch (add) the bundle:
“The bundle “ActionScript 3.tmbundle” does not contain the required “info.plist” file (or that file is corrupt) and can therefore not be installed.”
The flex bundle seemed to work… not sure what to do from here…
March 3rd, 2008 at 9:07 pm
alinear:
It looks as though my automated script for exporting and zipping the bundles hung half way through the ActionScript 3 bundle export - so only half the bundle was included in the zip you downloaded. This has now been rectified.
March 12th, 2008 at 7:27 pm
thank you.
thank you SO much for this indispensable bundle!
i made the transition to AS3 yesterday, and am discovering a world of consistency :):):)
question: how can i get the project to use the …-config.xml in “build/”? i tried the custom compile, which told me “/build/compile.sh not found/executable”.
ok, before i posted this comment, i decided to do some research on permissions (being new to OS X shell deliciousness). might be a good idea to add to your help file that for custom compile, you need to execute
chmod -x ./build/compile.sh
i’m still mighty confused by the contents of that file, though…
where does it get TM_BUNDLE_SUPPORT and the other path variables from? do i need to set all those manually? in TextMate preferences, or in my system? or does Textmate do that for me?
today is help a poor shell-noob day
March 20th, 2008 at 2:29 am
FlashDevelop > TextMate
March 26th, 2008 at 11:03 pm
[...] want a light weight editor that can quickly get you up and running, especially on small projects. Here is a good tutorial to help you get [...]
March 27th, 2008 at 10:41 am
Your work is very appreciated.
March 27th, 2008 at 4:41 pm
[...] FDT Setup (w/ Flex SDK) Text Mate Setup Project Organization The New York Flash Meetup meets once a month so if you are in the NYC area [...]
April 30th, 2008 at 2:59 pm
Any plans to update the flex bundle to Flex 3? Not sure what’s different but there are bound to be issues, right?
May 1st, 2008 at 4:24 pm
Rich:
Although there’s likely to be additions to the the classes and methods used in Flex 3 I’ve not yet been through the code and added them. You can use the Flex 3 SDK without any problems as I have updated the appropriate commands in the the ActionScript 3 Bundle. However, at the moment, you have to manually override the environmental variable TM_FLEX_PATH and point it to the flex 3 sdk directory for this to happen. You can do this globally in Preferences > Advanced > Shell Variables or on a project by project basis via the Project Information panel reached via the i button in the project file draw.
May 3rd, 2008 at 9:43 pm
[...] I had the Debug Player installed, I set all this up with Textmate and the excellent bundle from here. Here are a few screens from the debug the options you need to click on to get it [...]
May 18th, 2008 at 4:46 pm
[...] with ANT build scripts for fast and easy multi-swf builds (see Simon Gregory’s blog for the AS3 bundle and the ANT [...]
May 27th, 2008 at 10:13 am
Hey Simon, first of all thanks for your great bundle!
I just wanted to let you know that I integrated an fcsh server in your bundle…
It opens a new textmate window with the fcsh running.
I then compile each class on saving, and get any build errors instantly (with links and error message, formated via ruby) in the fcsh window.
I managed to do this via a pipe, its still ruff around the edges but works fine for me.
If your interested in integrating it, do not bother to contact me via mail, and i’ll send you the modified bundle.
June 18th, 2008 at 12:31 pm
[...] I wanted a better way to import classes from my class library. The TextMate ActionScript 3 Bundle Simon Gregory offers a nice auto complete functionality that lets you define a list of classes to choose from on [...]
June 18th, 2008 at 5:12 pm
Thanks so much for the bundle! This may be nit-picky, but I recently updated the bundle and found there are situations where, in for loops, I might have “i<=styleNames.length” as opposed to “i <= styleNames.length” (that is, one has spaces around “<=” and the other does not). This used to be parsed just fine by the syntax highlighter but now it seems it breaks it, so it and everything after it are not properly highlighted. I like to leave my spaces off sometimes.