KONY 2012 - one thing we can all agree on - read more

Bahrain

Depth Control in Flash .

Here is one of the swapDepths usage …
i use the following function in my website to controll the overlapped movieclips depths,
its triggered by [ onRollOver ] event of a Movieclip ..
Many thanks goes to scutty for the help …

function swapIt(mc:MovieClip):Void {
//Get the current MC Depth …
var depth = mc.getDepth();
//get current level depth
for (var i in this) {
//trace(this levels depth);
trace(this.getDepth());
//if the MovieClip’s Depth less than the Levels Depth then swap it ..
if (depth<(this[i].getDepth())) {
mc.swapDepths(this[i]);
depth = mc.getDepth();
}
}
}

here is a usage of the above Function …

m1.onRollOver = function() {
swapIt(this);
};

m0o

Related posts:

  1. Reversing Flash TimeLine using setInterval
  2. ActionScript Idle Timer , Can be used as a screen Saver.
  3. Pause flash TimeLine …

One Response to “Depth Control in Flash .”

  1. On February 22, 2007 at 8:31 am paul_knightly responded with... #

    this one post very good. i enjoy very much!

Add your response