XTRACE, MTASC and TextMate

Generally I use FDT to create my Flash projects, but have just trashed my Java paths and am unable to use Eclipse. So I thought I would have a go at using TextMate to create a Flash project and see if I can compile with MTASC, rather than using the slow Flash IDE and use XTrace, rather than the Flash Output. Also, if possible preview the swf in a browser with the Trace active.

I’ll try and keep this post brief and if necessary create new posts if certain points need more clarification.

The Monaki site explains how to set up TextMate, MTASC and XTrace to build Flash projects in Mac OSX.

(I won’t detail setting up the Main entry point the Application Class, or detail the structure of my project here.)

I installed the XTrace app and the com/mab/util/debug Class as described, but was unable to get the ‘build.sh’ or ‘runScript.sh’ to work. So, I switched to using TextMate to create the necessary MTASC files.

From the TextMate Menu Select: – Bundles – ActionScript – MTASC – Install MTASC Support Files.
This creates a file called ‘mtasc.yaml’. For a definition of yaml see the wikipedia entry). This will create a default file that MTASC uses. First step is to change these parameters from:

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

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

to reflect the structure of your project (in my case):

# Name of your output file:
swf: bin/textMateTest_2.swf

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

To use xTrace simply un-comment the following line
#trace: xtrace


trace: xtrace

Also if you change the preview line in the yaml file the to the path of the export html path:

preview: bin/textMateTest_2.html

The Flash file is previewed in a browser and the trace outputs to the XTrace application.

There are a few issues to sort out and document regarding the project:

1. I removed the com.mab.util.debug folder and the XTrace still worked.
2. I could not move the Application Class from the top level of the project.
3. I would really like to use XTrace with FDT, and MTASC.
4. I tested an application using a Flash library asset and it worked. (That is the application was able to attach a named MovieClip.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s