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

Lesson 8. Adding Complex Interactivity > Changing Movie-Clip Depth by Using the...

Changing Movie-Clip Depth by Using the Swapdepths Method

Your puzzle is nearly finished, but you can make a few improvements. As you drag the pieces around, you might notice that you seem to lose them as they go behind other puzzle pieces. You can fix this situation by forcing the puzzle piece you are currently dragging to go to the top of the stacking order. To do so, you use the swapDepths method, as follows:

movieClipPath.swapDepths(depth or target); 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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