Prev | Current Page 685 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Remember that that information only has a meaning when the movie is used
alone; when the movie is embedded or loaded into another, the definitions of the container always
prevail on the loaded ones. Inside the movie element, many other elements can be defined. In the
following example an image is loaded using a clip element.
< ?xml version=???1.0??? encoding=???iso-8859-1??? ? >
< movie width=???320??? height=???240??? framerate=???12??? >
< library >
< clip id=???Picture??? import=???picture.jpg???/ >
< !-- add more resources here -- >
< /library >
< frame >
< place id=???Picture???/ >
< /frame >
< /movie >
Note the use of the frame and place element. The first states that the movie contains just one frame and
the second places the image visible in the timeline. The id attribute has two purposes: referencing the
element inside the XML document ( place creates a reference to the clip using the id ) and as a class
name for the code developers (linkage name). If embedded in haXe, the clip will be available in the code
as the class Picture that can be enriched with code of its own and that obviously extends the
MovieClip class.


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