I don't know what "sprite.MirrorX = sprite.MirrorX + 500;" is supposed to do, but:
1) MirrorX and MirrorY are logical properties (do I want to flip the image? yes / no)
2) They are properties of individual sprite frames, not the whole sprite
3) you probably want to mirror along Y axis here, not X