# Scroll bar

**URL:** https://forum.kirupa.com/t/scroll-bar/118389
**Category:** Uncategorized
**Created:** [August 5, 2004, 1:21am UTC](https://forum.kirupa.com/t/scroll-bar/118389 "2004-08-05T01:21:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![karena](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@karena](https://forum.kirupa.com/u/karena)
#### Post date: [August 5, 2004, 1:21am UTC](https://forum.kirupa.com/t/scroll-bar/118389/1 "2004-08-05T01:21:01Z")

</div>

people…i need help…  
i 1 2 hav a scroll bar…when scroll to any level,it wil go to certain frame…  
the higher the scroll bar…the frame number is bigger…

---

<div class="post-metadata">

### Author: ![kapital](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@kapital](https://forum.kirupa.com/u/kapital)
#### Post date: [August 5, 2004, 1:32pm UTC](https://forum.kirupa.com/t/scroll-bar/118389/2 "2004-08-05T13:32:02Z")

</div>

> [@karena](#):
>
> people…i need help…  
> i 1 2 hav a scroll bar…when scroll to any level,it wil go to certain frame…  
> the higher the scroll bar…the frame number is bigger…

you need to make the piece that indicates how far down the scroll bar you are in relation to the number of frames you have. eg:

frame to go to = (total frames/height of scrollbar) x position of indicator

example: frame\_pos=math.Round((142/100)\*40)

for the above, if the total number of your frames were 142, and the height of the scrollbar was 100, dividing these two would give you the number of frames incremented by scrolling one place up or down. multiply that by the position of the scrolling piece in relation to the size of the scrollbar and you have it.

---

<div class="post-metadata">

### Author: ![karena](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@karena](https://forum.kirupa.com/u/karena)
#### Post date: [August 11, 2004, 4:57am UTC](https://forum.kirupa.com/t/scroll-bar/118389/3 "2004-08-11T04:57:12Z")

</div>

i had try but i fail to do it…  
can u post a simple fla for me?  
thankx
