0 Replies Latest reply on Oct 2, 2006 7:53 AM by patbegg

    scrollpane stopps working when loaded in swf

    patbegg
      Hi,
      Hoping someone can help with this issue. I have a nice scrollpane with easing that works fine when on its own, but when loaded into another swf the scroll action stops working.

      I have tried the _lockroot action on the swf to be loaded but that seems to stop it working also.

      This is the code:
      txt.setMask(mask);
      scrollbar.onMouseDown = function() {
      if (this.hitTest(_root._xmouse, _root._ymouse) && txt._height>mask._height) {
      this.startDrag(false, scrollbarBG._x, scrollbarBG._y, scrollbarBG._x, scrollbarBG._height-this._height)
      txt.onEnterFrame = scrollThumbs;
      dragging = true
      }
      };
      scrollbar.onMouseUp = function() {
      stopDrag()
      dragging = false
      delete this.onEnterFrame;
      };
      function scrollThumbs() {

      var funkyVar = -this._parent.scrollbar._y*(((this._height-this._parent.scrollbar._height)/(this._parent. scrollbarBG._height-this._parent.scrollbar._height))-1)
      this.Y = (funkyVar-this._y)*.2;
      this._y += this.Y;
      if(Math.abs(funkyVar-this._y)<1 && !dragging){
      delete this.onEnterFrame
      }

      }

      Help is appreciated, this is driving me mad!!

      Cheers,
      Pat