Flash 8 Documentation |
|||
| Components Language Reference > DepthManager class | |||
ActionScript Class Name mx.managers.DepthManager
The DepthManager class allows you to manage the relative depth assignments of any component or movie clip, including _root. It also lets you manage reserved depths in a special highest-depth clip on _root for system-level services such as the pointer and tooltips.
In general, Depth Manager manages components automatically, using its own "shuffling" algorithm. You do not need to use its APIs unless you are an advanced Flash developer.
|
NOTE |
|
To use the DepthManager class for movie clip instances, you need to have a component in the library or on the Stage, and use "import mx.managers.DepthManager" at the beginning of your ActionScript. |
The following methods constitute the relative depth-ordering API:
The following methods constitute the reserved depth space API:
The following table lists the methods of the DepthManager class.
|
Method |
Description |
|---|---|
|
Creates a child of the specified symbol at the specified depth. |
|
|
Creates an object of the specified class at the specified depth. |
|
|
Creates an instance of the specified class at a specified depth in the special highest-depth clip. |
|
|
Creates an object at a specified depth in the highest-depth clip. |
|
|
Sets the depth above the specified instance. |
|
|
Sets the depth below the specified instance. |
|
|
Sets the depth to the specified instance in the highest-depth clip. |
The following table lists the properties of the DepthManager class. The constant values shown are the default values that the DepthManager algorithm uses to arrange depth. If you trace the following properties, you will see those constant values in the Output panel.
However, after you implement a DepthManager method, such as DepthManager.setDepthTo(), using one of the following properties, and then trace the component or movie clip depth, you see that DepthManager sets the depths in increments of 20. The algorithm increments depths in case Flash needs to insert something else in the middle, based on other scripts, components, and so on.
|
Property |
Description |
|---|---|
|
A static property with the constant value 202. |
|
|
A static property with the constant value 101. This is the cursor depth. |
|
|
A static property with the constant value 204. |
|
|
A static property with the constant value 102. This is the tooltip depth. |
|
|
A static property with the constant value 201. |
|
|
A static property with the constant value 203. |
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00003457.html
Comments
No screen name said on Nov 15, 2006 at 8:43 AM : Cpt LoadTest said on Feb 3, 2007 at 8:48 AM :