Prev | Current Page 692 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


#if flash9
import flash.text.TextField;
import flash.text.TextFormat;
#else flash
import flash.TextField;
import flash.TextFormat;
#end
class Main
{
public static function main()
{
var lbl : TextField;
#if flash9
lbl = new TextField();
flash.Lib.current.addChild(lbl);
lbl.y = 30;
lbl.embedFonts = true;
lbl.defaultTextFormat = new TextFormat(???Nice Font???);
(continued)
Chapter 13: Replacing the Need for an IDE
369
#else flash
flash.Lib.current.createTextField(???lbl???, 1, 0, 30, 200, 30);
lbl = Reflect.field(flash.Lib.current, ???lbl???);
lbl.embedFonts = true;
lbl.setNewTextFormat(new TextFormat(???Nice Font???));
#end
lbl.text = ???Second Label???;
}
}
A lot more can be accomplished using SWFMill and its several unmentioned attributes and elements,
but those basics are enough to cover many of the more common necessities of the haXe /Flash
developers. SWFMill also supports sounds and arbitrary binary contents, positioning and animation of
clips, code execution, shared libraries, components, and much more.


Pages:
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704