Prev | Current Page 616 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Lib._root .
In the following example, a square is drawn on a newly created movie clip; a second movie clip is
added to the first with a smaller square inside. Ignore for the moment how the squares are generated
and take a look at the createMovieClip() method. It relies on a passed MovieClip instance
or on the flash.Lib.current if the argument is omitted, to generate a child MovieClip . The
createEmptyMovieClip() used in the method, needs a string identifier for the object to create; the
identifier can be used later on to reference the object by name. The second argument is a value for
the depth level in the stack.
??‘
??‘
??‘
Part II: Server Side, JavaScript, and Flash: Oh My!
320
After the two boxes have been created, they are moved on the x - axis and rotated by 30 degrees. All the
operations on the container movie clip, such as changing the coordinates, rotating and scaling, are
applied to the container itself and to all of its children. The rotation and the scaling have the pivot point
in the origin (point with coordinates 0, 0 ) of the actual movie clip.


Pages:
604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628