# Image viewer stops?

**URL:** <https://forum.kirupa.com/t/image-viewer-stops/106158>\
**Category:** Uncategorized\
**Created:** [April 2, 2004, 8:41pm UTC](https://forum.kirupa.com/t/image-viewer-stops/106158 "2004-04-02T20:41:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hondo311](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@hondo311](https://forum.kirupa.com/u/hondo311)\
**Post date:** [April 2, 2004, 8:41pm UTC](https://forum.kirupa.com/t/image-viewer-stops/106158/1 "2004-04-02T20:41:30Z")

</div>

rotating the crank scrolls the images based on angle of rotation.  
the problem is that when i let go of the mouse, the crank stops and “sticks” and doesn’t work any more.  
i want the images to change as the crank is cranked, and be able to keep cranking in both directions during and after.

## any help would be appreciated 🙂 fla is attached. here is the code for the crank:

mc.btn.onPress = function(){  
scrolling = true;  
}  
mc.btn.onmouseUp = function(){  
scrolling = false;  
}  
onEnterFrame = function(){  
if(scrolling){  
var dx=mc.\_x-\_xmouse;  
var dy=mc.\_y-\_ymouse;  
var rad = Math.atan2(-dy,-dx);  
var angle = (rad\*180)/Math.PI;  
mc.\_rotation=angle;

```
if (angle&gt;85 && angle&lt;=90) {

```

trace("angle = "+angle);  
\_root.changePhoto(1);  
} else if (angle\>175 && angle\<=180) {  
trace("angle = "+angle);  
\_root.changePhoto(-1);  
}  
}   
}
