Making icon jump from one place to another

I am creating a file in which there is a dual-monitor set up with one monitor over the other with a small mouse icon that moves when the user drags over a hotspot. When the user toggles a particular switch to the UPPER setting, the mouse icon moves as it would on a normal dual monitor setup where, when moving up, it skips from the top of the lower monitor to the bottom of the upper one.
When the switch is toggled to LOWER, however, the mouse will actually stop in the middle of the 2 monitors (either at the top of the lower or bottom of the upper monitor) depending on which direction it’s moving. (see attached image)
So far, I’ve been able to code the icon to work in the 1st situation. This code is below:

this.onEnterFrame = function() {
 if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
  if (monitors_mc[cursor]._xmouse != nowX || monitors_mc[cursor]._ymouse != nowY) {
   right = monitors_mc[drag]._x+monitors_mc[drag]._width;
   top = monitors_mc[drag]._y;
   botOfUpr = monitors_mc[drag]._y + monitors_mc[drag].top_mc._height;
   topOfLwr = monitors_mc[drag]._y + monitors_mc[drag]._height - monitors_mc[drag].bottom_mc._height;
   //topOfLwr = monitors_mc.drag_mc._y;
   //botOfUpr = monitors_mc.drag_mc.top_mc._y+monitors_mc.drag_mc.top_mc._height;
   bottom = monitors_mc[drag]._y+monitors_mc[drag]._height;
   // 
   if ((monitors_mc[cursor]._y<bottom && monitors_mc[cursor]._ymouse-nowY>0) || (monitors_mc[cursor]._y-10>monitors_mc[drag]._y && monitors_mc[cursor]._ymouse-nowY<0)) {
    monitors_mc[cursor]._y += 0.25*(monitors_mc[cursor]._ymouse-nowY);
   }
   // 
   if ((monitors_mc[cursor]._x<right && monitors_mc[cursor]._xmouse-nowX>0) || (monitors_mc[cursor]._x>monitors_mc[drag]._x+8 && monitors_mc[cursor]._xmouse-nowX<0)) {
    monitors_mc[cursor]._x += 0.25*(monitors_mc[cursor]._xmouse-nowX);
   }
   if ((nowY-monitors_mc[cursor]._ymouse) > 0) {
    if (monitors_mc[cursor]._y < topOfLwr && inMonitor=="bot") {
     monitors_mc[cursor]._y = botOfUpr;
     inMonitor = "top"
    }
   }
   if ((nowY-monitors_mc[cursor]._ymouse) < 0) {
    if (monitors_mc[cursor]._y > botOfUpr && inMonitor=="top") {
     monitors_mc[cursor]._y = topOfLwr;
     inMonitor = "bot";
    }
   }
   nowX = monitors_mc[cursor]._xmouse;
   nowY = monitors_mc[cursor]._ymouse;
  }
 }
};

However, I’m not sure how to go about performing the 2nd option. Does anyone have any ideas?

Chris