# Flash keeps telling me a ';' was expected..but ITS THERE!

**URL:** <https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161>\
**Category:** Uncategorized\
**Created:** [August 16, 2004, 4:28pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161 "2004-08-16T16:28:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle\_davis13](https://avatars.discourse-cdn.com/v4/letter/k/c5a1d2/32.png) [@kyle\_davis13](https://forum.kirupa.com/u/kyle_davis13)\
**Post date:** [August 16, 2004, 4:28pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161/1 "2004-08-16T16:28:14Z")

</div>

Symbol=tablesMovie, Layer=T, Frame=1: Line 8: ‘;’ expectedThis is the error that I get. This is the code associated with it:

I have bolded the troubled line of code

```auto
 
on(rollOver){  
  if (_root.menu2.tables.ablesMovie._currentframe == 10)
   stop();
  else{
   _root.menu2.enabledIn(1);
   _root.menu2.tables.lineMovie.lineMask.whichButtonIn(1);
   _root.menu2.tables.ablesMovie.seatMovie.gotoAndPlay("in");
   **_root.menu2.tables.8seaterOptionsBox.gotoAndPlay("in");
** _root.menu2.ptcPos(1);
   _root.window.menuWindowContent("Tables");
   }
}
   
 

```

why is it giving me this error?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2004, 4:42pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161/2 "2004-08-16T16:42:45Z")

</div>

I’ve noticed that sometimes Flash has trouble with instance names that use a number as the first or last character. Try renaming your MC to t8seaterOptionsBox or just seaterOptionBox or something like that.

:hr:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2004, 4:42pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161/3 "2004-08-16T16:42:50Z")

</div>

okay,

i found the problem (i think) but i dont’ understand why it’s happenin.

here’s your code:

```auto
 
on(rollOver){  
  if (_root.menu2.tables.ablesMovie._currentframe == 10)
   stop();
  else{
   _root.menu2.enabledIn(1);
   _root.menu2.tables.lineMovie.lineMask.whichButtonIn(1);
   _root.menu2.tables.ablesMovie.seatMovie.gotoAndPlay("in");
   _root.menu2.tables.8seaterOptionsBox.gotoAndPlay("in");
   _root.menu2.ptcPos(1);
   _root.window.menuWindowContent("Tables");
   }
}
   

```

first of all i’m not sure but i think you need to follow this format:

```auto
on(rollOver){  
  if (_root.menu2.tables.ablesMovie._currentframe == 10){
   stop();
  }else{

```

meaning you need to enclose what you want to do based on the conditional in {}.

i broke your code down piece by piece and the error you’re getting goes away when I change the name of

```auto
8seaterOptionsBox

```

to something different… the only guess i can make is that your name here interferes with a built-in flash function…

good luck

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2004, 5:54pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161/4 "2004-08-16T17:54:52Z")

</div>

Like Lunatic said. I usually rename them like “optionsBox8Seater” to get around this.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2004, 6:28pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161/5 "2004-08-16T18:28:34Z")

</div>

Just an information: variable names can contain letters, numbers and underscores, but can only begin with letters.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2004, 8:01pm UTC](https://forum.kirupa.com/t/flash-keeps-telling-me-a-was-expected-but-its-there/61161/6 "2004-08-16T20:01:48Z")

</div>

Thanks Claudio 🙂

[SIZE=-4]‘novice flasher’ my butt![/SIZE] 😛
