[haXe] first swf file
Filip Dreger
fdreger at gmail.com
Sun Dec 2 13:39:09 CET 2007
> I tried several ways, how can I create a basic flash 9 swf in haxe, how does
> the the source looks like and how do I copile per command line?
Use the source:
class Test {
static function main() {
// creates a TextField
var tf = new flash.text.TextField();
tf.text = "Hello World !";
// add it to the display list
flash.Lib.current.addChild(tf);
}
}
save it int a file called Test.hx
Execute the following command:
haxe -swf test.swf -swf-version 9 -main Test
while being in the same directory as the source. You'll get a basic
flash 9 file with haXe, a file called test.swf.
Both the file and the command line above come from the first four
parapgraphs of a tutorial called "haXe For Flash9", available on
haxe.org. The concept of hxml file being equal to command line
arguments is explained in detail in a text called "haXe usage (please
read this one first)" from haxe.org. The section is labeled
"tutorials". This is why I allow myself a question: what were the
"serveral ways" that you tried, according to your first mail?
Your answers are important, as they will help us all realize, which
parts of tutorials need further explanations and may still be unclear
to newcomers. I am ready to be convinced, but frankly, I don't see any
such place (unless someone simply skipped the tutorials).
Filip
More information about the Haxe
mailing list