This content has been marked as final. Show 5 replies
use the getDepth() and swapDepths() property of movieclips.
Thanks for your speedy answer ;)
How would I integrate these functions with drag and drop, and the task I am trying to do with it?
i can't answer that specifically because i don't know the rationale you should use to set depths.
but, in general, you can store all the depths in an array (using getDepth() and iterating all your display objects), sort() that array and create another array of your objects.
then use a custom sort on your object array using the criteria that suits your project and finally iterate through your object array assigning depths (using swapDepths() ) from the sorted depth array.
Thanks very much for your help ;)
Unfortunately, I'm a bit of a n00b at all this, so I'm not the best person to put together your instructions, but I'll try.