All pastes #123844 Raw Edit

Someone

public text v1 · immutable
·published 2006-08-09 17:05 UTC
rendered paste body
function sliderControl() {
   var w:Number = thumblist_mc._width/2;
   var hw:Number = mask_mc._width/2;
   var npixels:Number;
   // only do when mouse over slider mask
   if (_ymouse > mask_mc._y && _ymouse < mask_mc._y + mask_mc._height) {
      // mouse over left half of slider:
      if (_xmouse > mask_mc._x && _xmouse < mask_mc._x + hw) {
		   trace("x"+_xmouse);
         npixels = (hw - _xmouse) / hw * MAXPIXELS;
         thumblist_mc._x += npixels;
         if (thumblist_mc._x >= 0) thumblist_mc._x = thumblist_mc._x - w;
      // mouse over right half of slider:
      } else if (_xmouse > mask_mc._x + hw && _xmouse < mask_mc._x + mask_mc._width) {
          trace(rechts);
		 npixels = (_xmouse - hw) / hw * MAXPIXELS;
         thumblist_mc_x -= npixels;
         if (thumblist_mc._x <= -w) thumblist_mc._x = thumblist_mc._x + w;
      }
   }
}