# Infinite menu question?

**URL:** <https://forum.kirupa.com/t/infinite-menu-question/245781>\
**Category:** Uncategorized\
**Created:** [December 4, 2007, 12:01am UTC](https://forum.kirupa.com/t/infinite-menu-question/245781 "2007-12-04T00:01:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![almaline03](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@almaline03](https://forum.kirupa.com/u/almaline03)\
**Post date:** [December 4, 2007, 12:01am UTC](https://forum.kirupa.com/t/infinite-menu-question/245781/1 "2007-12-04T00:01:44Z")

</div>

I am using Kirupa’s Infinite menu. It is working great except I am using it on an elastic site and the center point always changes. Any idea on how I can get the center point to always stay in the middle of the screen when the screen resolution is resized.

here is the code:

```auto

onClipEvent (load)
{
   xcenter= Stage.width/2;
   speed=1/50;
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x-=(distance*speed);
   if (_x > 0) _x=-2226;
   if (_x < -2226) _x=0;
}

```

any idea of what i should put for

xcenter="???";

Thanks in advance!
