Replace mc

I have 2 questions :

  1. By pressing a button, I want a movie clip A to be visible on (50,50). Search help for a script.
  2. By pressing another button, I want another movie clip B to be visible on (50,50). But if A already appear on (50,50), B should be on (100,100). Need script for this.