Prev | Current Page 57 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

hxml . You can then run this file against the haXe compiler
to compile your application.
18
Part I: The Core Language
Try this now with the Hello World example. Create a new text file with the following content and save it
to the application directory with the filename HelloWorld.hxml :
-swf helloworld.swf
-main HelloWorld
Note how this content is split between two lines. For each parameter you add to the .hxml file, you need
to separate them with line breaks. This then allows the compiler to read the content as separate
commands. As you can probably guess from the parameters you ??™ ve listed, your .hxml file compiles to
the Flash SWF format. You can run this compile script by navigating to the working directory at the
command prompt and entering the following:
cmd > haxe HelloWorld.hxml
Windows users can also compile their applications by simply double - clicking the .hxml file. This
facility is not available on Linux and Mac OS.
Once you have created and run your compile script correctly, a new file is created in your application
directory with the name helloworld.


Pages:
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69