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

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

 
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?

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:

okay,

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

here’s your code:

 
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:

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

8seaterOptionsBox

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

good luck

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

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

Thanks Claudio :slight_smile:

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