DepthManager.createClassChildAtDepth()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004 and Flash MX Professional 2004

Usage

movieClipInstance.createClassChildAtDepth( className, depthFlag[, initObj] )

Parameters

className A class name.

depthFlag One of the following values: DepthManager.kTop, DepthManager.kBottom, DepthManager.kTopmost, DepthManager.kNotopmost. All depth flags are static properties of the DepthManger class. You must either reference the DepthManager package (for example, mx.managers.DepthManager.kTopmost), or use the import statement to import the DepthManager package.

initObj An initialization object. This parameter is optional.

Returns

A reference to the created child.

Description

Method; creates a child of the class specified by the className parameter at the depth specified by the depthFlag parameter.

Example

The following code draws a focus rectangle on top of all NoTopmost objects:

import mx.managers.DepthManager
this.ring = createClassChildAtDepth(mx.skins.RectBorder, DepthManager.kTop);

The following code creates an instance of the Button class and passes it a value for its label property as an initObj parameter:

import mx.managers.DepthManager
button1 = createClassChildAtDepth(mx.controls.Button, DepthManager.kTop, {label: "Top Button"});