# Dragable menu

**URL:** <https://forum.kirupa.com/t/dragable-menu/119176>\
**Category:** Uncategorized\
**Created:** [August 12, 2004, 3:27am UTC](https://forum.kirupa.com/t/dragable-menu/119176 "2004-08-12T03:27:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ujamerstand](https://avatars.discourse-cdn.com/v4/letter/u/a8b319/32.png) [@ujamerstand](https://forum.kirupa.com/u/ujamerstand)\
**Post date:** [August 12, 2004, 3:27am UTC](https://forum.kirupa.com/t/dragable-menu/119176/1 "2004-08-12T03:27:31Z")

</div>

i hav found a tutorial about dragable on ur site and i played w/ it for while, however, when i tried to make it go vertical instead of horizontal it doesnt work any more…

heres the code, can any1 explain to me whats wrong w/ it?

actionscripts under dragger, \<drag\>  
onClipEvent (load) {  
\_y = \_root.box.\_y-\_root.box.\_height/2+\_height/2 ;  
\_x = \_root.box.\_x ;  
yold = \_y ;  
}  
onClipEvent (enterFrame) {  
if (dragging) {  
if((\_root.\_ymouse\>\_root.box.\_y-\_root.box.\_height/2) and (\_root.\_ymouse\<\_root.box.\_y+\_root.box.\_height/2)) {  
\_y = \_root.\_ymouse ;  
dydrag = \_y - yold ;  
}  
}  
}

action script under clipgeneral, \<general\>  
onClipEvent (load) {  
\_x = \_root.pos.\_x ;  
\_y = \_root.pos.\_y -\_root.pos.\_height/2+\_height/2 ;  
positiongeneral = \_y ;  
}  
onClipEvent (enterFrame) {  
dest = positiongeneral - \_root.drag.ratio\*\_root.drag.dydrag ;  
pos = this.\_y ;  
this.\_y += (dest - pos) /7 ;  
}

thx

---

<div class="post-metadata">

**Author:** ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)\
**Post date:** [August 12, 2004, 10:20pm UTC](https://forum.kirupa.com/t/dragable-menu/119176/2 "2004-08-12T22:20:47Z")

</div>

wer is the tut?  
ill do me best but wivout the original (an after a cuple beers) im not 2 much help im afraid! 😉 (plus i think im just a tad layzee ;))

Prophet.
