0 Replies Latest reply on Jul 11, 2006 4:57 PM by adamgordon

    My Slider vanishes

    adamgordon
      I'm working on this site http://www.mediamotionintl.com/index2.html. If you go to the client page, there is a slider that moves in relation to the mouse _x. The problem occurs when you open another window in your browser. Of course it doesn't happen every time, but what does on occasion happen is the slider completely vanishes. I'm guessing that the mouse_x is off the chart on another window and it screws it up.

      Does anyone have any advice on how to solve this?

      Here is the code I used:

      slideSpeed = 0.0035;
      onEnterFrame = function(){
      //The code below causes the imgboxes to react to mouse movement//
      currentMousex = Math.floor(this._xmouse);
      pic1._x = Math.floor(pic1._x-(currentMousex*slideSpeed));
      pic2._x = Math.floor(pic2._x-(currentMousex*slideSpeed));
      pic3._x = Math.floor(pic3._x-(currentMousex*slideSpeed));
      pic4._x = Math.floor(pic4._x-(currentMousex*slideSpeed));
      pic5._x = Math.floor(pic5._x-(currentMousex*slideSpeed));
      pic6._x = Math.floor(pic6._x-(currentMousex*slideSpeed));
      pic7._x = Math.floor(pic7._x-(currentMousex*slideSpeed));
      pic8._x = Math.floor(pic8._x-(currentMousex*slideSpeed));
      pic9._x = Math.floor(pic9._x-(currentMousex*slideSpeed));
      pic10._x = Math.floor(pic10._x-(currentMousex*slideSpeed));
      pic11._x = Math.floor(pic11._x-(currentMousex*slideSpeed));
      pic12._x = Math.floor(pic12._x-(currentMousex*slideSpeed));
      //The code below causes the imgboxes to repeat//
      if(pic1._x <= -591){pic1._x += 1182;}
      else if(pic2._x <= -591){pic2._x += 1182;}
      else if(pic3._x <= -591){pic3._x += 1182;}
      else if(pic4._x <= -591){pic4._x += 1182;}
      else if(pic5._x <= -591){pic5._x += 1182;}
      else if(pic6._x <= -591){pic6._x += 1182;}
      else if(pic7._x <= -591){pic7._x += 1182;}
      else if(pic8._x <= -591){pic8._x += 1182;}
      else if(pic9._x <= -591){pic9._x += 1182;}
      else if(pic10._x <= -591){pic10._x += 1182;}
      else if(pic11._x <= -591){pic11._x += 1182;}
      else if(pic12._x <= -591){pic12._x += 1182;}
      else{}
      if(pic1._x >= 591){pic1._x -= 1182;}
      else if(pic2._x >= 591){pic2._x -= 1182;}
      else if(pic3._x >= 591){pic3._x -= 1182;}
      else if(pic4._x >= 591){pic4._x -= 1182;}
      else if(pic5._x >= 591){pic5._x -= 1182;}
      else if(pic6._x >= 591){pic6._x -= 1182;}
      else if(pic7._x >= 591){pic7._x -= 1182;}
      else if(pic8._x >= 591){pic8._x -= 1182;}
      else if(pic9._x >= 591){pic9._x -= 1182;}
      else if(pic10._x >= 591){pic10._x -= 1182;}
      else if(pic11._x >= 591){pic11._x -= 1182;}
      else if(pic12._x >= 591){pic12._x -= 1182;}
      else{}
      }

      Thanks,

      Adam