Isometric tile game (swapdepths problems?)

hi there,

I’m trying to create an isometric tile game engine, and everything was going well as long as the hero moved a whole tile at a time. I’ve now added code in to make the hero move more smoothly, but the depthswapping is wrong (until you move fully onto a new tile, and then it’s corrected)
there’s also a weird bug where if you scroll around the map fully a couple of times, then occassional tiles start disappearing, and whole lines get left in odd places on the screen.

would anyone be kind enough to take a quick look and see if they can see where I’m going wrong? - any help would be greatly appreciated.

there’s an example of the swf here:
http://www.salmacis.co.uk/isometry/trials.html

and a zipped Flash 5 file (hopefully commented sufficiently!) here:
http://www.salmacis.co.uk/isometry/trials.zip

thanks again,
john