# Help with scrolling thumbnail panel AS3

**URL:** <https://forum.kirupa.com/t/help-with-scrolling-thumbnail-panel-as3/294256>\
**Category:** flash\
**Created:** [August 11, 2009, 2:36pm UTC](https://forum.kirupa.com/t/help-with-scrolling-thumbnail-panel-as3/294256 "2009-08-11T14:36:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krvz](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@krvz](https://forum.kirupa.com/u/krvz)\
**Post date:** [August 11, 2009, 2:36pm UTC](https://forum.kirupa.com/t/help-with-scrolling-thumbnail-panel-as3/294256/1 "2009-08-11T14:36:22Z")

</div>

Hi all. Trying to recode a scrolling thumbnail panel I found as an example of the web into AS3 mostly for educational purposes (to the person who created the example, thanks, forgot where I found it) but getting stuck in a couple of places. The panel works but my problems are:

1. lower boundary doesn’t work, panel continues to scroll into infinity.

2. as it is written, the mouse event that activates the scrolling is MOUSE\_MOVE, which is kind of a pain as the scrolling is kind of “jerky”, I have tried to make it an MOUSE\_OVER event, but I think it may be conflicting with the prior MOUSE\_OVER event. Not sure.

Code is below, it’s not very clean, I’m kind of a hack and rusty on top of that. Thanks in advance for any help.

```auto
panel.addEventListener(MouseEvent.ROLL_OVER, panelOver);

var vert:Number = stroke.height;
var horiz:Number = stroke.width;
var vertpos:Number = stroke.y;
var horizpos:Number = stroke.x;
//trace(panel.y);
function panelOver(event:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, panelMover);

function panelMover(event:MouseEvent):void
{
	if(event.stageY > vertpos && event.stageY < vert && event.stageX > horizpos && event.stageX < horiz){

	panel.y -= Math.round((event.stageY-(vert/2))/40);
	}
		if(panel.y >= 45) {
		panel.y = 45}
	}
	
	if(panel.y <= -1344) {
		panel.y = -1344}
	
	{	

	}
}

```
