Are origX and origY genuine variables? Is upButton the instance name you assigned to the button via the Properties panel?

If you are getting an error message, it may provide some useful info so share it if you can.

What you should do is put some trace code in to make sure things are what you expect them to be. If you are not familiar with the trace function, it is a very handy function that is useful for troubleshooting. It traces (displays) whatever you command it to in the output panel. So in front of those two lines of code you could use ...

trace("origX = "+origX);

trace("origY = "+origY);

trace(upButton); // will display something like _level0.upButton

upButton._x = origX;upButton._y = origY;

Those traces will tell you if any of those values aren't what you expect they should be