home *** CD-ROM | disk | FTP | other *** search
/ Sears Catalog 2006 Spring/Summer (French Canadian) / SearsCanada-AutomneEte2006-FrenchVersion-WinMac.bin / fr / otherstuff.swf / scripts / DefineSprite_3 / frame_1 / DoAction.as
Text File  |  2005-11-21  |  2KB  |  56 lines

  1. function setSkins()
  2. {
  3.    if(_parent.c_scrollTrackVisible)
  4.    {
  5.       var _loc3_ = new Color(scrollTrack_mc);
  6.       _loc3_.setRGB(_parent.c_scrollTrack);
  7.       false;
  8.    }
  9.    else
  10.    {
  11.       scrollTrack_mc._visible = false;
  12.    }
  13.    this._width = _parent.c_scrollWidth;
  14.    if(_parent.c_horizontal)
  15.    {
  16.       this._x += 16 - _parent.c_scrollWidth;
  17.    }
  18. }
  19. this.useHandCursor = false;
  20. setSkins();
  21. this.onPress = function()
  22. {
  23.    if(this._parent.enabled == false || this._parent.hitTest(_root._xmouse,_root._ymouse) == false)
  24.    {
  25.       return undefined;
  26.    }
  27.    if(this.hitTest(_root._xmouse,_root._ymouse) && !this._parent.drag.hitTest(_root._xmouse,_root._ymouse) && !this._parent.button_up.hitTest(_root._xmouse,_root._ymouse) && !this._parent.button_down.hitTest(_root._xmouse,_root._ymouse))
  28.    {
  29.       if(_parent._ymouse < this._parent.drag._y)
  30.       {
  31.          this._parent.pageUp();
  32.          this._parent.scrollDelay = true;
  33.          this._parent.delayTimer = setInterval(this._parent,"clearDelay",300);
  34.          this._parent.scrolling = "PAGEUP";
  35.       }
  36.       else
  37.       {
  38.          this._parent.pageDown();
  39.          this._parent.scrollDelay = true;
  40.          this._parent.delayTimer = setInterval(this._parent,"clearDelay",300);
  41.          this._parent.scrolling = "PAGEDOWN";
  42.       }
  43.    }
  44. };
  45. this.onDragOut = function()
  46. {
  47.    this._parent.scrolling = false;
  48.    this._parent.clearDelay();
  49. };
  50. this.onRelease = function()
  51. {
  52.    this._parent.scrolling = false;
  53.    this._parent.clearDelay();
  54. };
  55. stop();
  56.