# Help: drag movement restrictions and mc timeline control

**URL:** <https://forum.kirupa.com/t/help-drag-movement-restrictions-and-mc-timeline-control/201182>\
**Category:** Uncategorized\
**Created:** [September 19, 2006, 6:15am UTC](https://forum.kirupa.com/t/help-drag-movement-restrictions-and-mc-timeline-control/201182 "2006-09-19T06:15:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chevron8653](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@chevron8653](https://forum.kirupa.com/u/chevron8653)\
**Post date:** [September 19, 2006, 6:15am UTC](https://forum.kirupa.com/t/help-drag-movement-restrictions-and-mc-timeline-control/201182/1 "2006-09-19T06:15:06Z")

</div>

Hey guys.  
I was wondering cause i have a movie clip called leftleaver\_mc and ive made it dragable with the following codes.

this.leftswitch\_mc.onPress = function() {  
leftswitch\_mc.startDrag()  
}

this.leftswitch\_mc.onRelease = function() {  
leftswitch\_mc.stopDrag()  
}

that code obviously works but i what i want to do is make it so they can only drag up and down between the y coordinates of 990.1 and 793.8 on the stage and also not beable to move from the x coordinates of 276.4 while there dragging up and down.  
================================================== ====  
also another thing is when there moving the the leftswitch\_mc up and down between them coordinates i want it to control an animation ive made in another mc called testcylinder\_mc like the frame lable i want it to control in the cylinder mc is around 30 frames long starting at frame 6 of the mc’s timeline and if they movie the leftswitch\_mc up i want it to play that frame forward at normal speed and if they move leftswitch\_mc down i want it to play that frame in reverse at normal speed and also if leftswitch\_mc is at its original starting point i want the cylinder mc to return to frame 1.

thanks for reading i hope ive exsplained it easy for u guys to understand and to beable to help.

thanks in advanced
