# Scroller by Claudio

**URL:** https://forum.kirupa.com/t/scroller-by-claudio/24407
**Category:** flash
**Created:** [June 30, 2003, 3:45pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407 "2003-06-30T15:45:47Z")
**Posts on this page:** 14
**Page:** 3

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 17, 2004, 2:09am UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/41 "2004-08-17T02:09:23Z")

</div>

> [@\_this](#):
>
> **hi …  
> and a window component ?  
> inside path, what digit or name put ?  
> 🙂  
> why dont use this ?**

Sorry i couldn’t understand what you mean…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 7, 2004, 8:21pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/42 "2004-09-07T20:21:19Z")

</div>

Anyone looking for the horizontal version…here is one.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 10, 2004, 3:49am UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/43 "2004-09-10T03:49:35Z")

</div>

Super cool scroller Claudio! Thanks!

I have a question…maybe two. So using the horizontal version; if I load a movie clip to the stage using attachMovie into a blank MC called “main” how can I get the movie clip to scroll? It seems that I would need to determine the width of the attached movie and declare it somehow. I have tried (and deleted) to get this to work but to no avail. The only way it seemed to work is if “main” had something in it already. This is fine if you only load one MC and you can set the width inside main to the attached movie clip, but what if you want to load (at diferent times) MC’s of varying lengths…furthermore, what if the total width of said MC’s are huge?

What I am trying to avoid also is “overscroll”. That is to say I only ever want to scroll to the end of the loaded MC and no further.

I hope someone can help, it would be appreciated.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 12, 2004, 5:46am UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/44 "2004-09-12T05:46:47Z")

</div>

Okay…is the solution right in front of me or is it not possible…can someone please help me out…? Claudio?, Scottie?, anybody?

Cheers evryone!

Plonks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 23, 2004, 10:26am UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/45 "2004-09-23T10:26:47Z")

</div>

> [@plonker](#):
>
> Anyone looking for the horizontal version…here is one.

Hi,  
I was trying to use the horizontal and vertical srolls inside the same movie, but i can’t seem to get it to work! I have given each target movie different names, aswell as each mask etc…  
Does anyone have any ideas?? Please help.  
Cheers.

Bazz°

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 24, 2004, 6:16pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/46 "2004-09-24T18:16:29Z")

</div>

hey claudio how can I make it work using a DEVICE FONT option…i mean, with the mask the text has some smoothness and I dont like it, i need it to be like a pixel font…do u know how can i do that???

thnx in advance

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 27, 2004, 4:19pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/47 "2004-09-27T16:19:40Z")

</div>

Original POST

Hi,  
I was trying to use the horizontal and vertical srolls inside the same movie, but i can’t seem to get it to work! I have given each target movie different names, aswell as each mask etc…  
Does anyone have any ideas?? Please help.  
Cheers.

Bazz°

Could anyone please help me on the above question.

Thankyou very much…

---

<div class="post-metadata">

### Author: ![lejon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lejon/32/2181_2.png) [@lejon](https://forum.kirupa.com/u/lejon)
#### Post date: [March 21, 2006, 6:49am UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/48 "2006-03-21T06:49:17Z")

</div>

if i hadn’t gotten my scrollpane to actually work 100% of the time this would’ve seriously saved me, but i might just use it in the future to reduce my file sizes. i added this line of code to the bar to initiate the dragging of the dragger if the bar is pressed:

```auto

bar.onPress = function() {
	drag = true;
	if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
		this._parent.dragger._y = this._parent._ymouse;
		this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
	} else {
		this._parent.dragger._y = this._parent._ymouse;
	}
	dragger.scrollEase();
	dragger.onPress(); //<-------------- initiates on bar press to start dragging the dragger as well
};

```

great job on it claudio!

---

<div class="post-metadata">

### Author: ![Ygramul](https://avatars.discourse-cdn.com/v4/letter/y/7993a0/32.png) [@Ygramul](https://forum.kirupa.com/u/Ygramul)
#### Post date: [April 6, 2006, 9:32pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/49 "2006-04-06T21:32:21Z")

</div>

I used a horizontal version a few pages back, and I’m having the same troubles he had: the drag effect works fine along the bar, but the left and right buttons continue to scroll off into infinity. How can I fix it?

```auto
bar.useHandCursor = dragger.useHandCursor=false;
space = 500;
friction = 2;
speed = 2;
xD = dragger._x;
top = main._x;
bottom = main._x+mask_mc._width- 6622 -space;
dragger.onPress = function() {
    drag = true;
    this.startDrag(false, this._parent.xD+this._parent.bar._width-this._width, this._y, this._parent.xD, this._y);
    dragger.scrollEase();
};
dragger.onMouseUp = function() {
    this.stopDrag();
    drag = false;
};
bar.onPress = function() {
    drag = true;
    if (this._parent._xmouse>this._x+this._width-this._parent.dragger._width) {
        this._parent.dragger._x = this._parent._xmouse;
        this._parent.dragger._x = this._x+this._width-this._parent.dragger._width;
    } else {
        this._parent.dragger._x = this._parent._xmouse;
    }
    dragger.scrollEase();
};
bar.onMouseUp = function() {
    drag = false;
};
moveDragger = function (d) {
    if ((dragger._x>=xD+bar._width-dragger._width && d == 1) || (dragger._x<=xD && d == -1)) {
        clearInterval(myInterval);
    } else {
        dragger._x += d;
        dragger.scrollEase();
        updateAfterEvent();
    }
};
up_btn.onRollOver = function() {
    myInterval = setInterval(moveDragger, 0, -.1);
};
down_btn.onRollOver = function() {
    myInterval = setInterval(moveDragger, 0, .1);
};
up_btn.onRollOut = down_btn.onRollOut=function () {
    clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
    this.onEnterFrame = function() {
        if (Math.abs(dy) == 0 && drag == false) {
            delete this.onEnterFrame;
        }
        r = (this._x-xD)/(bar._width-this._width);
        dy = Math.round((((top-(top-bottom)*r)-main._x)/speed)*friction);
        main._x += dy;
    };
};

```

Thanks!

---

<div class="post-metadata">

### Author: ![sophia](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sophia](https://forum.kirupa.com/u/sophia)
#### Post date: [May 1, 2006, 1:34am UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/50 "2006-05-01T01:34:23Z")

</div>

I have always loved this scroller. It works like a charm and it is easy to alter. However, I was wondering if it is possible to add something to the script that would have the dragger snapping to certain locations on the way down the scroll. The code is beyond me, but I think it would be a nice addition to the .swf

If this is possible, TIA

---

<div class="post-metadata">

### Author: ![micheeel](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@micheeel](https://forum.kirupa.com/u/micheeel)
#### Post date: [May 11, 2006, 10:35pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/51 "2006-05-11T22:35:56Z")

</div>

Since this topic is about scrollers, maybe this can help out some people, dont know… check out. I took kirupa’s tutorial script and made it AS2 OO class

> **[Content Scrollbar (Revised) - Page 8](https://www.kirupa.com/forum/showthread.php?206127-Content-Scrollbar-(Revised)&s=bca6da82fbde4d17a4ce22672e928550&p=1843650#post1843650)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

### Author: ![saros](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@saros](https://forum.kirupa.com/u/saros)
#### Post date: [June 11, 2008, 5:26pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/52 "2008-06-11T17:26:02Z")

</div>

[QUOTE=DeeTex;1675630]I thought I might share this with you dudes.[/QUOTE]

First, thanks DeeTex for sharing this with us dudes, I read this TRUELY long threads and it seems your the only one who was able to fix this problem with height of the dynamically loaded text.  
And thanks to Claduio for coming up with this awesome scroller.

---

<div class="post-metadata">

### Author: ![saros](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@saros](https://forum.kirupa.com/u/saros)
#### Post date: [June 11, 2008, 5:36pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/53 "2008-06-11T17:36:47Z")

</div>

sam you didin’t read all of the threads did you ?  
I think on page 20 or something they discussed this.

---

<div class="post-metadata">

### Author: ![daynie](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@daynie](https://forum.kirupa.com/u/daynie)
#### Post date: [June 16, 2008, 12:50pm UTC](https://forum.kirupa.com/t/scroller-by-claudio/24407/54 "2008-06-16T12:50:23Z")

</div>

Claudio nice job … How does it work on horizontally slide bar? Thanks

[Previous page](https://forum.kirupa.com/t/scroller-by-claudio/24407.md?page=2)
