Prev | Current Page 686 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


The clip element supports JPGs, PNGs (with or without the alpha channel), SWF movies, and SVG
although the implementation of the last is still in an initial phase. A collection of resources can be created
using the library element. Putting resources in a library element is important because it is the only
way to have them available in haXe (or ActionScript).
To compile the previous example and the following SWFMill examples, use the following command:
> swfmill simple library.xml library.swf
Where library.xml is the SWFML file to compile and library.swf is the output file. The SWMill
executable must be on the path of command line/console, and the files described in the XML file must be
positioned relatively to the directory where the command is invoked. In the previous example,
picture.jpg and library.xml must be in the same folder where the execution happens.
Using the Image Movie Clip with ha X e
How do you use the produced library file in haXe? It is very simple. Create a class with the same linkage
name as defined in the XML, add some code to it if necessary, and use your class normally.


Pages:
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698