Skip to main content
Participant
March 21, 2014
Answered

1084: Syntax error: expecting rightparen

  • March 21, 2014
  • 2 replies
  • 5576 views

Hi folks

I am a real greenhorn here. I have just upgraded from CS3 to CS6 and had to edit a *.fla file in Flash CC. I saved it and exported as a *.swf  I now have about 40 compiler errors all of the same format "1084: Syntax error: expecting rightparen before and"

This is typical of the scenario

Location

Scene 1, Layer 'buttons', Frame 1, Line1. Column 17

1     if (_ymouse>202 and _ymouse502) {

Is it expecting a close of brackets before and ie  if(_ymouse>202)

Another example:

1     if (_xmouse>7 and _xmouse<24 and _ymouse<235 and text1.y<113

2     {text1.y_y+=4}

3     if _xmouse>33 and _xmouse50 and _ymouse<235 and text1.y>30)

4     {text1.y_y=4}

In this group, relating to Symbol definitions on a page labelled services-page it has the syntax error for Line 1, column 17  expecting rightparen before and, and also for Line 3 at column 16, just before the and.

Surely adding a bracket in that group of conditions before an "and" will mess up the "if" condition...

Any help will be graetfully appreciated!  (I can do screen grabs if it helps!)

This topic has been closed for replies.
Correct answer kglad

there's no keyword 'and'.  use the double ampersand:

if(whatever && whateverelse)

p.s. there's no 'or', either.  use double pipe (uppercase backslash), ||

2 replies

Participant
February 2, 2023

Adobe Animate is my school course -  the support has said to come here, but I am not seeing the exact same problem, but similar syntax errors with trying to run this project. Can anyone help?

 

 

kglad
Community Expert
Community Expert
February 2, 2023

those frame labels should be strings. ie, replace asterisks with quotes.

Participant
May 25, 2023

how to fix this, sir! It's for my project

 

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 21, 2014

there's no keyword 'and'.  use the double ampersand:

if(whatever && whateverelse)

p.s. there's no 'or', either.  use double pipe (uppercase backslash), ||

Participant
March 21, 2014

Hi Thanks for that. I will give it a go and see what happens! I will save original file as a back up then make changes.

Stephen

kglad
Community Expert
Community Expert
March 21, 2014

you're welcome.