# Scrolling Panel Sticky and not working properly

**URL:** <https://forum.kirupa.com/t/scrolling-panel-sticky-and-not-working-properly/257694>\
**Category:** flash\
**Created:** [April 16, 2008, 1:04pm UTC](https://forum.kirupa.com/t/scrolling-panel-sticky-and-not-working-properly/257694 "2008-04-16T13:04:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricky55](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ricky55](https://forum.kirupa.com/u/Ricky55)\
**Post date:** [April 16, 2008, 1:04pm UTC](https://forum.kirupa.com/t/scrolling-panel-sticky-and-not-working-properly/257694/1 "2008-04-16T13:04:30Z")

</div>

Hi

I have a website that uses a scrolling thumbnail panel, code shown below.

You can see the page here: (click on tranquility mattresses)  
[http://www.idahobeds.co.uk/home.html](http://www.idahobeds.co.uk/home.html)

The swf that contains the panel is loaded into the main swf and this is where the problem comes from. The panel is sticky and sometimes doesn’t spring into life properly.

If I access the swf on its own (without loading into the main swf) it scrolls fine.

Is there any way I can improve this?

My code currently looks like this:-

Thanks

```auto

stop();

//Scrolling Panel Actions
var home:MovieClip = panelStroke_mc;
//Scrolling Panel Actions
panelMovie_mc.onRollOver = panelOver;

function panelOver() {
   this.onEnterFrame = scrollPanel;
   delete this.onRollOver;
}

var b = panelStroke_mc.getBounds(home);

function scrollPanel() {
   if(home._xmouse<b.xMin || home._xmouse>b.xMax || home. _ymouse<b.yMin || home. _ymouse>b.yMax) {
      this.onRollOver = panelOver;
      delete this.onEnterFrame;
   }
   var xdist = _xmouse -333;
   panelMovie_mc._x += -xdist / 18;
   if(panelMovie_mc._x >= -190) {
      panelMovie_mc._x = -190;
   }
   if(panelMovie_mc._x <= -827) {
      panelMovie_mc._x = -827;
   }
   
}

```
