DepthManager to manage the depth of mcs created by AS.
This Manager can not manage the mcs created by FlashIDE.
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).
mc | the mc to be set to bottom |
exceptMC | the exceptMC of bottom mc. |
Error | when the exceptMC is not at the bottom currently. |
static public function bringToTop(mc:MovieClip):Void
Bring the mc to all brother mcs' top.
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.
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.
mc | the mc to be set to bottom |
exceptMC | the exceptMC of bottom mc. |
is the mc is at the bottom
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.