18 Replies Latest reply on Nov 19, 2010 4:59 AM by Ned Murphy

    Help! I need this movieclip to follow the cursor but only within certain coordinates!

    dirkbang

      Hello

       

      I'm rather new to action scripting and need a bit of a shove in the right direction.

       

      This is what I'm having trouble with - I've used this code to make the background movieclip follow the cursor:

       

      onClipEvent(enterFrame) {
      x=_root._xmouse
      y=_root._ymouse
      _x+=(x-_x)/10
      _y+=(y-_y)/10
      }

       

      However - I want to restict it's movement so it remains masked behind the other black dot with the "hglf" graphic.

       

      Hope this makes sense and someone can help me out!

       

      Thanks