# Kirupa scrollpane doesnt work

**URL:** <https://forum.kirupa.com/t/kirupa-scrollpane-doesnt-work/274290>\
**Category:** flash\
**Created:** [October 28, 2008, 3:13am UTC](https://forum.kirupa.com/t/kirupa-scrollpane-doesnt-work/274290 "2008-10-28T03:13:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![celicasaur](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@celicasaur](https://forum.kirupa.com/u/celicasaur)\
**Post date:** [October 28, 2008, 3:13am UTC](https://forum.kirupa.com/t/kirupa-scrollpane-doesnt-work/274290/1 "2008-10-28T03:13:57Z")

</div>

I’ve tried various tutorials on this site and different versions for doing the same thing, but I can’t get any of them to work. I have Flash CS3.

This tutorial from kirupa doesnt work yet it’s the one i’d like the most to work as it’s everything i have been looking for.

> **[Content Scrollbar (Revised)](https://www.kirupa.com/forum/showthread.php?t=206127&highlight=scroll%2Bpane)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Here’s the code for it:

```auto

scrolling = function () {
 var scrollHeight:Number = scrollbg._height;
 var contentHeight:Number = contentMain._height;
 var draggerHeight:Number = dragger._height;
 var maskHeight:Number = maskedView._height;
 //
 var initPosition:Number = dragger._y=scrollbg._y; var initContentPos:Number = contentMain._y;
 var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
 //
 var left:Number = scrollbg._x;
 var top:Number = scrollbg._y;
 var right:Number = scrollbg._x;
 var bottom:Number = scrollbg._height-draggerHeight+scrollbg._y;
 //
 var dy:Number = 0;
 var speed:Number = 10;
 var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-draggerHeight);
 //
 dragger.onPress = function() {
  var currPos:Number = this._y;
  startDrag(this, false, left, top, right, bottom);
  this.onMouseMove = function() {
   dy = Math.abs(initPosition-this._y);
   contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
  };
 };
 dragger.onMouseUp = function() {
  stopDrag();
  delete this.onMouseMove;
 };
 btnUp.onPress = function() {
  this.onEnterFrame = function() {
   if (contentMain._y + speed < maskedView._y) {
    trace(dragger._y + " " + top);
    if (dragger._y <= top) {
     dragger._y = top;
     contentMain._y += speed;
    } else {
     contentMain._y += speed;
     dragger._y -= speed / moveVal;
    }
   } else {
    dragger._y = top;
    contentMain._y = maskedView._y;
    delete this.onEnterFrame;
   }
  };
 };
 btnUp.onDragOut = function() {
  delete this.onEnterFrame;
 };
 btnUp.onMouseOut = function() {
  delete this.onEnterFrame;
 };
 btnDown.onPress = function() {
  this.onEnterFrame = function() {
   if (contentMain._y - speed >finalContentPos) {
    if (dragger._y>=bottom) {
     contentMain._y -= speed;
     dragger._y = bottom;
    } else {
     contentMain._y -= speed;
     dragger._y += speed/moveVal;
    }
   } else {
    dragger._y = bottom;
    contentMain._y = finalContentPos;
    delete this.onEnterFrame;
   }
  };
 };
 btnDown.onRelease = function() {
  delete this.onEnterFrame;
 };
 btnDown.onDragOut = function() {
  delete this.onEnterFrame;
 };
};
scrolling();

```

I’ve entered the instance names as I should have done, according to the tutorial.

Now all I get is loads of errors:  
 ![](http://forum.kirupa.com/uploads/kirupa/5022/de96b4ebfb3a7a3b.jpg)

Guidance, please 🙂
