# gotoAndStop from draggable slider?

**URL:** <https://forum.kirupa.com/t/gotoandstop-from-draggable-slider/207062>\
**Category:** flash\
**Created:** [November 14, 2006, 2:39pm UTC](https://forum.kirupa.com/t/gotoandstop-from-draggable-slider/207062 "2006-11-14T14:39:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnauger](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@johnauger](https://forum.kirupa.com/u/johnauger)\
**Post date:** [November 14, 2006, 2:39pm UTC](https://forum.kirupa.com/t/gotoandstop-from-draggable-slider/207062/1 "2006-11-14T14:39:04Z")

</div>

Hi - hope you can help

Basically, I’m trying to get a movie clip (called “scroll” and located on the \_root timeline) to jump to and stop on frames 1-40 depending on where a draggable slider is positioned. The slider goes from 0 - 140 on the y axis.

The code in the slider itself is as follows:

on (press) {  
startDrag("", false, 0, 0, 0, 140);  
dragging = true;  
}

on (release, releaseOutside) {  
stopDrag();  
dragging = false;  
}

and then

onClipEvent (load) {  
top = \_y;  
bottom = top + 140;  
left = \_x;  
right = \_x;  
}  
onClipEvent (load) {  
if (dragging == true) {  
gotoAndStop("\_root.scroll", (\_y-100));  
}  
}

on the level above. I’m realising this isn’t right as the slider makes no difference to the targeted MC.

Any advice??

Thanks

j
