PDA

View Full Version : Function to find lowest unoccupied depth.



APDesign
February 29th, 2004, 12:27 AM
Ugh, I'm sorry for asking because I KNOW I've seen this function here before!!!!! I've tried so many searches though but I guess I don't know exactly what to ask... So if anyone can help me I need a function to find the lowest available depth for use in attach movies and such. And I also wanted to ask if running a function like this a lot would be too intensive to be practical. Thanks if anyone can help.

Voetsjoeba
February 29th, 2004, 07:46 AM
Well in Flash MX 2004, there is getNextHighestDepth, but no getNextLowestDepth (at least not that I know of).

You might want to search through http://proto.layer51.com. There's a good chance you'll find what you need there :)

pom
February 29th, 2004, 10:43 AM
http://www.flashxpress.net/r_flash/f_proto/pr_movieclip/getMinDepth.as

Here's a translation of the header:
/*------------------------------------------------------------------------------
** + getMinDepth(pMin) - mama 03/04/02 - mama@yamago.net
** int getMinDepth(pMin)
** gets the lowest depth
** pMin, lowest depth to search
** by default, pMin = 0
-------------------------------------------------------------------------------*/

APDesign
February 29th, 2004, 11:31 PM
Thanks a lot guys! I was completely oblivious to the getNextHighestDepth function.