Ive been going back to isometrics again recently, and Ive been trying to come up with the elusive perfect depth swapping method. By perfect I mean the following that objects can move freely in 3D isometric space in units of pixels, and depth swapping is independent of tile size. My definition of isometric space is where the x-axis runs NW-SE, the z-axis runs NE-SW, and the y-axis runs N-S.

Ive come close to it before by using a method like the following, but I dont think I ever came up with a perfect solution. This is just off the top of my head now so it might not be perfect. Note that this presumes all MovieClips that were attached to the stage where attached at the same depth level (e.g. -100) and their depth sorted isometrically immediatly.

Code:
function isoDepthSort (mc, isoPos) {
 mc.swapDepths((isoPos.x*103)+(isoPos.z*100)+(isoPos.y*103));
}