1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Creating Tabbed Content in Flash with swapDepths


Understanding depths in Flash can help you organize dynamic content and create simple and yet highly effective content navigation systems. The depth refers to the stacking order of movie clips – in other words, which one is “on top” when they’re all arranged together. The higher the number of the depth, the closer to the top of the stack the movie clip is; with this knowledge, we can use swapDepths to change the stacking order of movie clips created to represent content tabs.

Levels take priority over depth assignments; therefore, when you’re swapping the depths of various objects, they must be on the same timeline in order for it to be effective. In most cases raising the depth of something on a lower level (such as changing the depths of symbols inside a movie clip) will not cause it to obscure something on a higher level.

For now, however, we’re not worried about levels; we’re just using layers and depths to create tabbed content navigation. Create three separate layers, each with not only the top tab, but also the full area of the page that will contain your content.

©2014 About.com. All rights reserved.