Class mx.managers.DepthManager

mx.managers.DepthManager

Description

Class for managing the depth (z-order) of objects.

Field Index

__depthManager, _childCounter, _parent, _topmost, createClassObject, createObject, getDepth, highestDepth, holder, kBottom, kCursor, kNotopmost, kTooltip, kTop, kTopmost, lowestDepth, numberOfAuthortimeLayers, reservedDepth, swapDepths

Method Index

new DepthManager()

buildDepthTable(), createChildAtDepth(), createClassChildAtDepth(), createClassObjectAtDepth(), createObjectAtDepth(), findNextAvailableDepth(), getDepthByFlag(), setDepthAbove(), setDepthBelow(), setDepthTo(), shuffleDepths(), sortFunction(), test()

Constructor Detail

DepthManager

function DepthManager()

Field Detail

reservedDepth

static reservedDepth:Number

highestDepth

static highestDepth:Number

lowestDepth

static lowestDepth:Number

numberOfAuthortimeLayers

static numberOfAuthortimeLayers:Number

kCursor

static kCursor:Number

kTooltip

static kTooltip:Number

kTop

static kTop:Number

kBottom

static kBottom:Number

kTopmost

static kTopmost:Number

kNotopmost

static kNotopmost:Number

holder

static private holder:MovieClip

_childCounter

_childCounter:Number

_topmost

_topmost:Boolean

createClassObject

createClassObject:Function

createObject

createObject:Function

swapDepths

swapDepths:Function

getDepth

getDepth:Function

_parent

_parent:MovieClip

__depthManager

static __depthManager:DepthManager

Method Detail

sortFunction

static function sortFunction(a:
MovieClip, b:MovieClip):Number

test

static function test(depth:
Number):Boolean

createClassObjectAtDepth

static function createClassObjectAtDepth(className:
Object, depthSpace:Number, initObj:Object):UIObject
create an instance of a class at a depth relative to other content
Parameters
className the name of the class
depthSpace either kCursor or kTooltip
initObj object containing initialization properties
Return
reference to object @tiptext @helpid 3304

createObjectAtDepth

static function createObjectAtDepth(linkageName:
String, depthSpace:Number, initObj:Object):MovieClip
create an instance of a symbol at a depth relative to other content
Parameters
linkageName the linkage name of the symbol in the library
depthSpace either kCursor or kTooltip
initObj object containing initialization properties
Return
reference to object @tiptext @helpid 3305

createClassChildAtDepth

function createClassChildAtDepth(className:
Function, depthFlag:Number, initObj:Object):UIObject
create an instance of a class at a depth relative to other content
Parameters
className the name of the class
initObj object containing initialization properties
Return
reference to object @tiptext @helpid 3306

createChildAtDepth

function createChildAtDepth(linkageName:
String, depthFlag:Number, initObj:Object):MovieClip
create an instance of a symbol at a depth relative to other content
Parameters
linkageName the linkage name of the symbol in the library
initObj object containing initialization properties
Return
reference to object @tiptext @helpid 3307

setDepthTo

function setDepthTo(depthFlag:
Number):Void
set this object at a particular depth, moving other objects to make room if needed
Parameters
depthFlag the desired depth @tiptext @helpid 3308

setDepthAbove

function setDepthAbove(targetInstance:
MovieClip):Void
set this object above the target object, moving other objects including the target object to make room if needed
Parameters
targetInstance the target object @tiptext @helpid 3309

setDepthBelow

function setDepthBelow(targetInstance:
MovieClip):Void
set this object below the target object, moving other objects including the target object to make room if needed
Parameters
targetInstance the target object @tiptext @helpid 3310

findNextAvailableDepth

function findNextAvailableDepth(targetDepth:
Number, depthTable:Array, direction:String):Number
Parameters
targetDepth desired depth
depthTable generated by call to buildDepthTable
direction "up" - look up if something occupies that depth, or "down"
Return
Number next available depth

shuffleDepths

function shuffleDepths(subject:
MovieClip, targetDepth:Number, depthTable:Array, direction:String):Void
Parameters
subject the object we want to move
targetDepth desired depth
depthTable generated by call to buildDepthTable
direction "up" - look up if something occupies that depth, or "down" or undefined - use best judgement

getDepthByFlag

function getDepthByFlag(depthFlag:
Number, depthTable:Array):Number
Parameters
depthFlag either kTop, kBotton, kTopmost or kNoTopmost
depthTable generated by call to buildDepthTable
Return
Number a good depth to start with

buildDepthTable

function buildDepthTable(Void):
Array
Return
Array a table of the depths of the child objects