Movie Clips stay on keyframes even when on a different keyframe

The title may sound confusing, but let me explain. I have a photo gallery on two different pages. Whenever you go to the photo gallery, either page, I have it setup so that when you rollOver a picture, it swaps the depth of the picture so that they show up in front of everything else on the page and enlarges the picture. However, let’s just say you rollOver one of the images, and then you click the next page on the photo gallery, or the home page or whatever, that movieclip still stays on the page. It’s as if Flash is disregarding keyframes or the timeline or something. It’s weird.

I thought that even if this happened, it would be ok, and I could send that picture behind everything else so I made this code:

on (rollOut) {
this.swapDepths(-2000);
}

but it doesn’t work.

Any ideas?