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);
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();
}
}
}

swapDepths

here is a usage of the above Function …

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

m0o

Advertisements

Actions

Information

One response

22 02 2007
paul_knightly

this one post very good. i enjoy very much!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: