# Infinite Draggable Menu

**URL:** <https://forum.kirupa.com/t/infinite-draggable-menu/283926>\
**Category:** flash\
**Created:** [March 12, 2009, 3:49pm UTC](https://forum.kirupa.com/t/infinite-draggable-menu/283926 "2009-03-12T15:49:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnthonyV1121](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@AnthonyV1121](https://forum.kirupa.com/u/AnthonyV1121)\
**Post date:** [March 12, 2009, 3:49pm UTC](https://forum.kirupa.com/t/infinite-draggable-menu/283926/1 "2009-03-12T15:49:48Z")

</div>

I’m using the code below for an infinite looping menu but this menu code makes it move on its own. I want the looping/movement to be activated by the user literally dragging up and down. Does anyone know how I can alter this code so it responds to the user dragging up and down. Any help would be appreciated. Thanks.

import flash.events.Event;  
var ycenter:Number=300;  
var speed:Number=.05;  
slider\_mc2.addEventListener(Event.ENTER\_FRAME, doit);

function doit(event:Event):void  
{  
var distance:Number=mouseY-ycenter;  
event.target.y+=(distance_speed);//or clip.y+=(distance_speed);  
if (event.target.y \> 110) {  
event.target.y = -1074;  
}  
if (event.target.y \< -1074) {  
event.target.y = 110;  
}  
}
