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

Chapter 11. Working with Movie Clips > Managing movie clip depths

Managing movie clip depths

Every movie clip has its own z-order space that determines how objects overlap within its parent SWF file or movie clip. Every movie clip has an associated depth value, which determines if it renders in front of or behind other movie clips in the same movie clip timeline. When you create a movie clip at runtime by using %{attachMovie (MovieClip.attachMovie method)}%, %{duplicateMovieClip (MovieClip.duplicateMovieClip method)}%, or %{createEmptyMovieClip (MovieClip.createEmptyMovieClip method)}%, you always specify a depth for the new clip as a method parameter. For example, the following code attaches a new movie clip to the timeline of a movie clip named container_mc with a depth value of 10.

container_mc.attachMovie("symbolID", "clip1_mc", 10);


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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