Depth Control in Flash .

15 07 2006

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);
//if the MovieClip’s Depth less than the Levels Depth then swap it ..
if (depth<(this[i].getDepth())) {
depth = mc.getDepth();


here is a usage of the above Function …

m1.onRollOver = function() {




One response

22 02 2007

this one post very good. i enjoy very much!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: