View Full Version : highest depth
bongbox
May 11th, 2004, 01:32 AM
putting a movieclip into highest depth without knowing which clip is in the highest depth
eki
May 11th, 2004, 07:39 AM
myClip.swapDepths(9999);
pom
May 11th, 2004, 07:17 PM
/*------------------------------------------------------------------------------
** + getMaxDepth(pMax) - mama 03/04/02 - mama@yamago.net
** int getMaxDepth()
** gets the highest depth
** pMax, optional parameter, low limit of the search
** by default pMax = 0
-------------------------------------------------------------------------------*/
MovieClip.prototype.getMaxDepth= function (pMax) {
if (!pMax) pMax=0;
for (var z in this) {
if ((typeof this[z]=="movieclip" || this[z] instanceof TextField || this[z] instanceof Button || this[z] instanceof Video) && this[z].getDepth()!=undefined && this[z].getDepth()<1048575) return (pMax>this[z].getDepth()+1) ? pMax : this[z].getDepth()+1;
}
return undefined;
}
ASSetPropFlags(MovieClip.prototype,"getMaxDepth",1);
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.