1 Reply Latest reply on Dec 1, 2006 11:43 AM by Bob_Robertson

    permanently move a MC

    Enfade
      I have a problem to permanently move a MC across the screen. Here is the code so far:

      var mousex = _xmouse
      var mousey = _ymouse
      var speed = 20

      onEnterFrame
      if ((mousex > 10) && (mousex < 210)) {
      _root.mc_test._x += speed;
      }

      It works... after a fashion. The moment my mouse comes between 10 and 210 pixels the MC does move 20 pixels to the right. The problem is that when my mouse goes out of its locations the MC goes back to its original location.
      The idea is that a) the MC keeps moving 20 spaces for as long as the mouse is between the coordinations and stay at the location when i leave them.

      Any help is apreciated.