HaXe is an object-oriented programming language that is similar to Java and Actionscript, both widely known programming languages. However, unlike them, haXe is not dedicated to one virtual machine or interpreter, or anything of the sort. Instead, haXe does something really sneaky yet clever and awesome: it compiles to other languages and bytecode. Not just that, but haXe has it's own APIs for the language that are easy to learn and use.
To get started, download & install haXe from
here. It is available for Windows, Mac OSX, and Linux. Then, look for a compatible code editor
here and install it. Open up your sleek code editor and make a new project or folder for our classic example. Make a new file/class called "HelloWorld.hx", and open it. Then, enter this in:
class HelloWorld {
public static function main() {
trace("Hello, HaXe!");
}
}
(look familiar?)
Now, either press run in your IDE or open a command prompt/terminal and find your file, then enter this in:
haxe -swf HelloWorld.swf -main HelloWorld compile.hxml
This will tell the compiler to generate the flash file "HelloWorld.swf" from the classes in the project/folder which uses HelloWorld as it's main class. Now, open up HelloWorld.swf in your browser and be amazed.