Prev | Current Page 622 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

display.MovieClip;
import flash.text.TextField;
import flash.text.TextFieldType;
class Main
{
public static function main()
{
var t = new TextField();
Lib.current.addChild(t);
t.text = ???Hello World!???;
t.type = TextFieldType.INPUT;
// alternatively you can set a text in HTML format
t.htmlText = ???Hello < b > World! < /b > ???;
}
}
Multimedia Contents
There are two techniques to display multimedia contents inside a movie: embedding or dynamically
loading. The first is explained in the next chapter in the ??? Assets with SWFMill ??? section dedicated to the
SWFMill library. The latter uses a movie clip (a Loader in Flash 9) to load dynamically and to display
contents.
Images and Movies
In the following examples, an image picture.jpg located in the same directory as the resulting .swf
file will be loaded and immediately displayed. In a real - world application you will probably want to
monitor the loading progress; this can be accomplished using the proper load events.
Remember that when you want to load a file from a relative URI as in the previous example, the path
will be relative to the .


Pages:
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634