# Scrolling menu - continuous

**URL:** <https://forum.kirupa.com/t/scrolling-menu-continuous/179998>\
**Category:** Uncategorized\
**Created:** [February 24, 2006, 4:12pm UTC](https://forum.kirupa.com/t/scrolling-menu-continuous/179998 "2006-02-24T16:12:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirksmith](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dirksmith](https://forum.kirupa.com/u/dirksmith)\
**Post date:** [February 24, 2006, 4:12pm UTC](https://forum.kirupa.com/t/scrolling-menu-continuous/179998/1 "2006-02-24T16:12:03Z")

</div>

Hi

I have a scrolling menu that I’d like to adapt so it continuously scrolls - so once either end of the image panel is reached, the other end automatically appears.

You can see the menu on the ‘work’ page of [www.dirksmith.com](http://www.dirksmith.com)

Any ideas how I can adapt the existing script (below) to achieve this?

Thanx

Dirk

```auto
_root.panel.onRollOver = panelOver;

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

var b = stroke.getBounds(_root);

function scrollPanel() {
    if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
        this.onRollOver = panelOver;
        delete this.onEnterFrame;
    }
    
    if(panel._x >= 644) {
        panel._x = 644;
    }
    
    if(panel._x <= 250) {
        panel._x = 250;
    }
    
    var xdist = _xmouse -710;
    
    panel._x += Math.round(-xdist / 9);
}

```
