# Scroll Bar

**URL:** https://forum.kirupa.com/t/scroll-bar/65606
**Category:** Uncategorized
**Created:** [September 28, 2004, 4:47am UTC](https://forum.kirupa.com/t/scroll-bar/65606 "2004-09-28T04:47:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hemagfx](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@Hemagfx](https://forum.kirupa.com/u/Hemagfx)
#### Post date: [September 28, 2004, 4:47am UTC](https://forum.kirupa.com/t/scroll-bar/65606/1 "2004-09-28T04:47:15Z")

</div>

Hi

Can I know how do i get a smooth scroll bar like the one  
in IE.

Thanks.

---

<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 28, 2004, 5:04pm UTC](https://forum.kirupa.com/t/scroll-bar/65606/2 "2004-09-28T17:04:19Z")

</div>

use the flash component?

---

<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 28, 2004, 11:15pm UTC](https://forum.kirupa.com/t/scroll-bar/65606/3 "2004-09-28T23:15:47Z")

</div>

I don’t know why but there are people coplaining about the component. A friend asked me to write a scrollbar function, here it is (hope it helps, but it does not have any scrollbuttons (they are easy to add though)

var iInitPos = Content.\_y;  
btnDrag.onPress = function() {  
var iDragSize = 210  
startDrag(this, false, 0, 0, 0, iDragSize);  
this.onEnterFrame = function() {  
var iPercent = this.\_y/iDragSize ;  
var iJuego = Content.\_height-Mask.\_height;  
var pos = iInitPos-(iJuego\*iPercent);  
Content.\_y = pos;  
};  
};  
btnDrag.onRelease = function() {  
stopDrag();  
this.onEnterFrame = null;  
};
