DepthManager.createClassChildAtDepth()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

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

Parameters

className A class name. This parameter is a of type Function.

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. The return type is UIObject.

Description

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

Example

The following code draws a focus rectangle in front 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"});