# This Just In - Scrollbars are for losers!

**URL:** https://forum.kirupa.com/t/this-just-in-scrollbars-are-for-losers/192739
**Category:** flash
**Created:** [June 30, 2006, 4:47pm UTC](https://forum.kirupa.com/t/this-just-in-scrollbars-are-for-losers/192739 "2006-06-30T16:47:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DanontheMoon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/danonthemoon/32/7436_2.png) [@DanontheMoon](https://forum.kirupa.com/u/DanontheMoon)
#### Post date: [June 30, 2006, 4:47pm UTC](https://forum.kirupa.com/t/this-just-in-scrollbars-are-for-losers/192739/1 "2006-06-30T16:47:56Z")

</div>

After all of this time spent getting scrollbars to work, I figured it out using the  
easydragger .fla from the tutorials section! There’s no need for scrollbars, a dragger does EXACTLY what I need! After finishing this…

[http://www.kirupa.com/developer/flash5/menudragger.htm](http://www.kirupa.com/developer/flash5/menudragger.htm)

First open ‘clipgeneral’ and make 2 duplicate rows of the graphic on top, don’t forget to open the align panel and center your (now 3 square by 4 square) grid graphic. should look like…

* * *

|1|2|3|4|  
|1|2|3|4|  
|1|2|3|4|

Go back in, and on top of the ‘Drag’ layer, make another layer called ‘Drug’. Then, go back and assign the instance name ‘X\_btn’ to the instance of the ‘bouton’ button. Make a duplicate movie clip of ‘dragger’, name it whatever you want (I named mine ‘crouton’, don’t ask why). Inside ‘crouton’, the instance of ‘bouton’ is ‘y\_btn’.

Give it the same AS as the X\_btn:  
on (press) {  
dragging = 1 ;  
}  
on (release) {  
dragging = 0 ;  
}

but change the AS in ‘crouton’ (your vertical slider) to read:  
onClipEvent (load) {  
yold = \_y ;  
}  
onClipEvent (enterFrame) {  
if (dragging) {  
\_y = \_root.\_ymouse ;  
dydrag = \_y - yold ;  
yold = \_y ;  
\_root.general.\_y += 3\*dydrag ;  
}  
}

this exactly mirrors the code in the ‘dragger’ instance on the stage:  
onClipEvent (load) {  
xold = \_x ;  
}  
onClipEvent (enterFrame) {  
if (dragging) {  
\_x = \_root.\_xmouse ;  
dxdrag = \_x - xold ;  
xold = \_x ;  
\_root.general.\_x += 3\*dxdrag ;  
}  
}

You should now have working X and Y sliders! Huzzah!

Now, here’s where I run into a problem - how do i set parameters for my draggers so that it doesn’t scroll past a certain point in either direction?  
is it…  
setproperty(general)=\_x.max=400, \_x.min=-400 or something like that?
