Mouse, Game

I have a quick question, I am making a flash game where you can move the gun around to shoot people, although the hand is not complete and i want to make it so that when the hand is the mouse you can only move it left and right, not up or down.