Free Tools: mxmlc.exe and AS3

About two days ago, I was doing some research on getting Edit Plus 2 to fire up mxmlc.exe. I read the docs and in my opinion it was very minimal when it came to do a simple Hello World. What was positive about that experience was that I understand the numerous compiler options and I understand how mxmlc.exe looks for {appName}-config.xml to reading an XML file containing all the compiler options.

Then I came across an excellent tutorial by Senocular who’ve I seen in the past post often on the ActionScript.org forum. It’s about 19 pages which makes for a nice softcopy walkthrough of how to get up and running with the mxmlc FREE compiler. Here’s a quick summary…

Fun with mxmlc.exe

  • Drag and Drop your .as files onto mxmlc.exe and it will output a .swf
  • Overview of compiler options and their aliases
  • .BAT file script to help make .swf’s

Quick AS3 primer from the perspective of an experienced AS2 coder

  • Sprite instead of MovieClip.
  • Display Objects Hierarchy (no more depths)
  • Drawing API (draw on a graphic property rather than on a MovieClip)
  • Embed SWF assets and instantiate them like classes
  • Event Handling (an intermediate example)
  • Package and Class structures
    • “Helper classes” remain outside of a package block but are exclusively available to all classes defined in .as file.
    • “package functions” are defined as a property of a package and are not a property of any class. trace() is a good example of this
  • Visibility modifiers: public, private, protected and internal
  • override: This keyword lets you customize super class methods. Like you could overwrite the function body for trace() with your own method.
  • const/final: Make commit variables and classes respectively as concrete constants
  • Data typing: You can use * as a data type to make the type as a Wild Card (useful for making the compiler happy)
  • int/uint: New integer data types are optimized.
  • “in” keyword: The syntax has changed so that it’s flexible enough to be used in ways outside of a for loop conditional.

I’ve come across all of this information before in the past but this is the first time I’ve seen it in a nice and tidy all-in-one place. Great read!

http://www.senocular.com/?id=1.354

One Response to “Free Tools: mxmlc.exe and AS3”

  1. Bart Says:

    I like the as2 vs as3 part, thanks!

Leave a Reply