Class org.aswing.utils.DepthManager

Description

DepthManager to manage the depth of mcs created by AS.

This Manager can not manage the mcs created by FlashIDE.

Field Index

MAX_DEPTH, MIN_DEPTH

Method Index

bringToBottom(), bringToTop(), createMCSequenced(), isBottom(), isJustAbove(), isJustBelow(), isTop()

Field Detail

MAX_DEPTH

static public MAX_DEPTH:Number

MIN_DEPTH

static public MIN_DEPTH:Number

Method Detail

bringToBottom

static public function bringToBottom(mc:MovieClip, exceptMC:MovieClip):Void

bringToBottom(mc:MovieClip, exceptMC:MovieClip)
bringToBottom(mc:MovieClip)

Bring the mc to all brother mcs' bottom.

if exceptMC is undefined or null, the mc will be sent to bottom of all. else, the mc will be sent to the bottom of all but above the exceptMC. If you use a exceptMC, make sure the exceptMC is always at the bottom of all mcs, unless, this method maybe weird(may throw Errors).

Parameters

mcthe mc to be set to bottom
exceptMCthe exceptMC of bottom mc.

Throws

Errorwhen the exceptMC is not at the bottom currently.

See Also

bringToTop

static public function bringToTop(mc:MovieClip):Void

Bring the mc to all brother mcs' top.

isTop

static public function isTop(mc:MovieClip):Boolean

Returns is the mc is on the top depths in DepthManager's valid depths. Valid depths is that depths from MIN_DEPTH to MAX_DEPTH.

isBottom

static public function isBottom(mc:MovieClip, exceptMC:MovieClip):Boolean

isBottom(mc:MovieClip, exceptMC:MovieClip)
isBottom(mc:MovieClip)

Returns is the mc is at the bottom depths in DepthManager's valid depths. Valid depths is that depths from MIN_DEPTH to MAX_DEPTH.

if exceptMC is undefined or null, judge is the mc is at bottom of all. else, the mc judge is the mc is at bottom of all except the exceptMC.

Parameters

mcthe mc to be set to bottom
exceptMCthe exceptMC of bottom mc.

Return

is the mc is at the bottom

isJustBelow

static public function isJustBelow(mc:MovieClip, aboveMC:MovieClip):Boolean

Return if mc is just first bebow the aboveMC. if them don't have the same parent, whatever depth they has just return false.

isJustAbove

static public function isJustAbove(mc:MovieClip, belowMC:MovieClip):Boolean

Return if mc is just first above the belowMC. if them don't have the same parent, whatever depth they has just return false.

See Also

createMCSequenced

static public function createMCSequenced(parent:MovieClip):Array

Create a sequence contains all mcs sorted by their depth.