6 Replies Latest reply on Nov 19, 2010 6:34 AM by kglad

    Need "side margins" to restrict movement of movieclip that follow mousee

    VeryNew_To_AS3

      I would like to keep the side to side movement of my movieclip that follows the mouse restricted within a "margin" (please excuse my not knowing the technical term if there is one) so that it stays within 75 pixels of the right and left hand side of the edge of the stage and does not go beyond it.

       

      Here is my code:

       

      mouse_x = _xmouse;

      setProperty (_root.hand_mc, _x, mouse_x+((getProperty(_root.hand_mc,_x)-mouse_x)/2));

       

       

      Thanks to anyone who takes the time to read this. This forum is AWESOME!!!