# Scrollpane not working when loaded into another swf

**URL:** <https://forum.kirupa.com/t/scrollpane-not-working-when-loaded-into-another-swf/202535>\
**Category:** flash\
**Created:** [October 2, 2006, 3:04pm UTC](https://forum.kirupa.com/t/scrollpane-not-working-when-loaded-into-another-swf/202535 "2006-10-02T15:04:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat\_Begg](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@Pat\_Begg](https://forum.kirupa.com/u/Pat_Begg)\
**Post date:** [October 2, 2006, 3:04pm UTC](https://forum.kirupa.com/t/scrollpane-not-working-when-loaded-into-another-swf/202535/1 "2006-10-02T15:04:29Z")

</div>

Hi guys,  
Got an annoying one. I have a nice scrollpane with easing that works fine until it is loaded into another swf - when i do the scroll action stops working.  
I have tried the \_lockroot action but this stops it working on its own and when loaded.

Been really pulling my hair on this one so any help is appreciated.

This is the code: (i have tried changing the \_root references to ‘this’ but no joy.

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)&lt;1 && !dragging){
	delete this.onEnterFrame
}

```

}
