Flash CS4 Professional ActionScript 2.0

DepthManager.createChildAtDepth()

Disponibilité

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Utilisation

movieClipInstance.createChildAtDepth(linkageName, depthFlag[, initObj])

Paramètres

linkageName Identifiant de liaison. Ce paramètre est une chaîne.

depthFlag Une des valeurs suivantes : DepthManager.kTop, DepthManager.kBottom, DepthManager.kTopmost, DepthManager.kNotopmost. Tous les indicateurs de profondeur sont des propriétés statiques de la classe DepthManager. Vous devez référencer le package DepthManager (mx.managers.DepthManager.kTopmost, par exemple) ou utiliser l'instruction import pour importer le package DepthManager.

initObj Objet d'initialisation. Ce paramètre est facultatif.

Valeur renvoyée

Une référence à l'objet créé. Le type renvoyé est MovieClip.

Description

Méthode : crée une occurrence enfant du symbole spécifié par le paramètre linkageName à la profondeur spécifiée par le paramètre depthFlag.

Exemple

L'exemple suivant crée une occurrence minuteHand du clip MinuteSymbol et la place devant l'horloge :

import mx.managers.DepthManager;
minuteHand = clock.createChildAtDepth("MinuteSymbol", DepthManager.kTop);