Prev | Current Page 635 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The API provides many methods to deal with things such as jumping to a specific frame
and stopping or playing the execution of a certain timeline, but it is not possible to create library symbols
of this type programmatically. A new MovieClip instance, for example, has just one empty frame and it
is not possible to add more at run time.
This does not mean that it is not possible to create visually rich elements at run time; it is just a matter of
changing the point of view. To draw figures, you can rely on the drawing API that will be discussed
later in this chapter. To manage the temporal events you can leverage on the enterFrame event to create
transitions and time - dependant effects.
A more complex example follows to demonstrate the use of the enterFrame event and to resume what
has been explained until now. A SlideShow class is created; its purpose is to load a set of images from
the server and display them one after the other with a nice cross - fade effect. Images start to load at the
class instantiation.


Pages:
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647