# Infinite menu

**URL:** <https://forum.kirupa.com/t/infinite-menu/286949>\
**Category:** Uncategorized\
**Created:** [April 23, 2009, 10:49am UTC](https://forum.kirupa.com/t/infinite-menu/286949 "2009-04-23T10:49:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGOAT](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@TheGOAT](https://forum.kirupa.com/u/TheGOAT)\
**Post date:** [April 23, 2009, 10:49am UTC](https://forum.kirupa.com/t/infinite-menu/286949/1 "2009-04-23T10:49:54Z")

</div>

Hello

Im pretty new to flash and am trying to create an infinite menu (basically pictures that scroll acorss the screen according to the mouse position), but i keep getting an error when i preview the clip.  
Here is my action script code:  
onClipEvent (load)  
{  
xcenter=250;  
speed=1/10;  
}  
onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance\*speed);  
if (\_x \> 0) \_x=-500;  
if (\_x \< -500) \_x=0;  
}

error is on line 1 and 6, it says clip events are permitted only for movie clip instances.

Now i have set the pictures out on the stage and converted all of them into a movie clip, im not really sure where the error is or if its something im doing wrong.

Any suggestions?
