3 Replies Latest reply on Dec 4, 2006 8:27 AM by Newsgroup_User

    moving with mouse

    Strangedenial Level 1
      hello, I got this script which makes the object move with the mouse through x axis, but it moves all the way, I want it to move in a specific area, not in the whole x axis, I'm kinda new with this thing and I could make it stop it's smaller than the x axis I want but cant make it stop if it's bigger than I want,
      nah
      I hope I'm clear enough;

      Basicly, I want the thing move between x-180 and x-350



      onClipEvent (enterFrame)
      {
      mx = _root._xmouse;
      if (mx < _x)
      {
      dx = _x - mx;
      }
      else
      {
      dx = mx - _x;
      } // end else if
      moveSpeedx = dx / 10;
      if (mx < _x)
      {
      setProperty("", _x, _x - moveSpeedx);
      }
      else
      {
      setProperty("", _x, _x + moveSpeedx);
      } // end else if
      }