TextMate for ActionScript

Wow! I’ve been exploring the various features of TextMate and how it’s use relates to Flash / ActionScript development. There are some great built in features and lively communities offering excellent bundles for extending TextMate.

Here’s how I set it all up.

Essentially you install the ActionScript bundle and use the Bundle Editor to point everything in the proper direction.

class test {
function test() {
// Empty constructor
// Hook for MTASC. This method will be called to start the application
static function main() {
var myVar:String;
myVar=” Patrick”
_root.hello_txt.text = “Hello, World!”+myVar;
_root.Button1.onRelease = function(){
trace(“Hello World!”);

I copied the above .as file from the one that’s automatically generated by selecting file>New from template>ActionScript>MTASC sample and fiddled with it.

If you stick a .yaml file in the same directory as your .as and .swf file you can pass parameters to your preview like, trace, in my case through console, and the SWF header.


# Name of your output file:
swf: test.swf

# Name of your main class:
app: test.as

# Folder/URL/file to open when compilation succeeds. Use ‘textmate’ to preview in TextMate:
preview: textmate

# SWF Header:
player: 8
width: 800
height: 600
fps: 31
bgcolor: 000000

# Optional, use it to send additional MTASC parameters (i.e: -strict)
params: -main -mx

# If you want to use Console.app (see )
trace: console


Leave a comment


email* (not published)