• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Controlling Movie Clips Dyna... > Z-SORTING MOVIE CLIP INSTANCES

Z-SORTING MOVIE CLIP INSTANCES

Changing the depth of movie clip instances is known as z-sorting. The letter z is used in the name because changing the depth gives the effect of a third dimension in Flash: z (in addition to x and y). You can use duplicateMovieClip() or attachMovie() to set the depth of movie clip instances when you create them, or you can change the depth dynamically using the swapDepths() method of the Movie Clip object. With swapDepths() you can exchange the depth of any two movie clip instances or move an instance to a specified depth.

Here is the syntax for swapping the depths of two movie clip instances:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint