The problem is that the second event isn't evaluated until after the first, so the first swaps the objects, then the second event runs, sees that you've now clicked on the MOVED object, so swaps them back again. What I'd suggest in this case is to place a Group after these two events, with the swap code in it and have the button events turn on the group, so that it runs. The Group should always turn itself off again. This ensures that the code only runs once.