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

Chapter 7. Controlling the Movie Clip > Getting Movie Clip Depth Levels

Getting Movie Clip Depth Levels

When working with a movie clip, you may need to control the depth level at which an instance shows up at run time. As you have learned so far, every movie clip has an associated depth level, which determines whether it displays in front of or behind another object.

When you create a new movie clip using the createEmptyMovieClip() method, you are required to define the new object’s depth level as a parameter. But how do you know what depth level to choose? After all, if you have already been generating movie clips dynamically, you may not know the depth levels for each of them. The method getNextHighestDepth() can tell you the next available depth value.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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