swapDepths without using an onClipEvent

I have 2 images that I want to swap places on a certain frame in my animation. I’ve been messing with it for quite sometime now and I can accomplish one of two things. Either the animation goes smoothly and the images don’t swap depths or the images swap depths and the animation hangs. Can anyone help me out here?