Prev | Current Page 60 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


HXML Compiler Files
Now take a closer look at the .hxml file. The content of the .hxml file you created to compile your
HelloWorld application contains switches that are notable by the preceding hyphen. These switches act
as commands that tell the compiler how you want the compiled output to be constructed. For example,
the first line of your file displays -swf helloworld.swf . This tells the compiler that you want to create
a file called helloworld.swf that is of the SWF type. The next line displays -main HelloWorld . This
line tells the compiler that your entry method is found in the HelloWorld class, which is contained in a
file called HelloWorld.hx . Each switch you add to your .hxml file should be separated with a new line.
The -main switch is important, as it allows haXe to set the starting method that will be called when the
resulting movie or script is run. If you fail to specify a -main switch, then the resulting output will be
created as a non - executable library. You ??™ ll look at this more later in the chapter.


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