Flash IDE for Designers - Flexbuilder for Developers! →← Array sorting

TextMate and mxmlc

A lot of the time, the only reason I have Flash open is to compile an fla which is completely empty except for the document class.

I have been playing with the mxmlc compiler and TextMate Bundles in an effort to create a workflow where I can create a project and compile an AS3 class into a swf straight from TextMate without Flash or FlexBuilder open. I started with the various build commands in the current Actionscript 3 Bundle and edited it so I could specify which class would be compiled and the name and location of the resulting swf. I am also working on commands for testing in adl (AIR debugger) and eventually I plan on creating a command to package AIR apps.

I will post all of it here as soon as it is post-worthy, so check back soon.

November 7th, 2007  by Stephen  /  12 Comments

Comments on “TextMate and mxmlc”

  1. Be sure to check out the Flex Compiler Shell (FCSH). I use build system inspired by Yuichi Tateno’s fcwrap, which compiles my SWFs whenever I save changes to the code, and then serves the SWFs via a local HTTP server.

    Nathan de Vries on November 7th, 2007 at 8:01 pm
  2. Apologies, the link to fcwrap was incorrect in the previous comment.

    Nathan de Vries on November 7th, 2007 at 8:03 pm
  3. I love textmate, and being able to code exclusively in that would be pretty sick.

    In the meantime though, if all of your FLA’s are empty except for a document class, why not just do a pure AS project in Flex Builder? You can get access to all the flash packages(via an fl package swc you can get at http://labs.thesedays.com/2007/04/16/flash-cs3-swc-for-flexbuilder/ ) and cs3 components (simple process that is explained at http://www.moock.org/blog/archives/000253.html ). Most importantly, you still get access to the debugger and the profiler. I’ve found both of them immensely helpful.

    Chris Rebstock on November 8th, 2007 at 3:41 am
  4. Very interested in your solution. I hacked my own workflow together by customizing the AS3 bundle, but for FCSH to work, you need iTerm. And iTerm was quite buggy on my system. It’s worth it to use FCSH though, it greatly speeds up compile time. I also used console.app for outputting trace() commands. All works right now, but the resulting workflow still feels a little bit McGuyver style :)

    Monokai on November 8th, 2007 at 4:26 am
  5. You should find that all you need to do is define a couple of project variables ( TM_FLEX_FILE_SPECS - the file you want to compile, and TM_FLEX_OUTPUT - the swf to create) then the bundle will handle everything else using mxmlc or fcsh and iTerm if they are installed.

    At the moment I’m trying to find a workaround to get iTerm out of the equation and run the fcsh wrapper interactively but it’s still not there yet. That way TextMate will be able to intercept and format the output - just like it does when it falls back on mxmlc only.

    Simon on November 8th, 2007 at 9:19 am
  6. Thanks for all the suggestions, and it’s great to hear about other people’s workflow when working in the Flash platform where there are so many tools and methods to get the same results. Again, I’ll post the solution that I come up with when I’m happy with it, and would love to see other people’s solutions.

    @chris re:FlexBuilder
    I can’t stand the FlexBuilder interface, mostly because of a lot of small details, and some features of TextMate that I am addicted to. I do agree that the profiler is a nice feature (especially with the enhancements in 3), so I open FB at that point in a project and just run the swf in the debug player.

    The Minister on November 8th, 2007 at 11:02 am
  7. Hi guys, i’m now migrating to Mac and i’m yet searching apps than they can replace the than i was using in windows. A app than i had at windows than i’m feeling lack is FlashDevelop, then TextMate can be a exit on the Mac?

    Junio Vitorino on November 11th, 2007 at 11:48 am
  8. i really, really, really look forward to your bundle. so finish it. now.

    honestly, though, i need a solution that works better than cmd-Tab -> cmd-Enter, repeat, repeat, repeat.

    ian on November 21st, 2007 at 10:35 am
  9. Another possibility is to use Sprouts. This is a utility that provides quite a lot of support for ActionScript 2, ActionScript 3 and MXML projects. One of the major benefits is that it provides rake tasks that automatically compile and run SWF files and then send trace output to the terminal. You can execute these (and collect trace output) directly from TextMate using the Ruby / Rake command in the Ruby bundle.

    Luke Bayes on December 20th, 2007 at 1:33 pm
  10. Just in case folks miss the link on my name above, the project is here

    Luke Bayes on December 20th, 2007 at 1:34 pm
  11. Keep up the good work.

    Emmly on October 23rd, 2008 at 8:42 am
  12. Thanks for writing this.

    Kylia on October 27th, 2008 at 9:24 am