# Flash CS3 AS 2.0 Syntax error

**URL:** https://forum.kirupa.com/t/flash-cs3-as-2-0-syntax-error/289628
**Category:** flash
**Created:** [June 2, 2009, 7:10pm UTC](https://forum.kirupa.com/t/flash-cs3-as-2-0-syntax-error/289628 "2009-06-02T19:10:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wanderlustjules](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@wanderlustjules](https://forum.kirupa.com/u/wanderlustjules)
#### Post date: [June 2, 2009, 7:10pm UTC](https://forum.kirupa.com/t/flash-cs3-as-2-0-syntax-error/289628/1 "2009-06-02T19:10:23Z")

</div>

Hi there,

I’m pretty new to Flash and my first project is my own on-line portfolio. I found (what I think is a Flash 5) code on this board to create an infinite menu. I’m trying to tweak it so that it works in AS 2.0 for CS3 and I keep getting a syntax error. Can anyone help me?

Here’s the code:

menu.loadClip()  
{  
xcenter=150;  
speed=1/10;  
}  
menu.onEnterFrame() {  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance\*speed);  
if (\_x \> 0) \_x=-300;  
if (\_x \< -300) \_x=0;  
}

The syntax error seems to be with the [COLOR=“Blue”]menu.onEnterFrame() {[/COLOR] line.
