loadVariables syntax error?

I cannot seem to find the syntax error that Flash's debugger is complaining about.

**Error** Symbol=menu, layer=Layer 1, frame=1:Line 18: ')' or ',' expected
         loadVariables("GetDetails.asp?Record=" add String(CurrentRecord), this)

Total ActionScript Errors: 1        Reported Errors: 1

The loadVariables statement worked fine in Flash 7 - soon as I converted to 8 this error surfaced. Any help is appreciated.

LVL 3
Curtis ShullFounderAsked:
Who is Participating?
 
seifipConnect With a Mentor Commented:
Its right... Nearly all programming software (ex.: Flash, Delphi) shows the error line one line after the real error so if you hace error on line 18 your programming/compiling soft will write you that you have the error on line 19.
0
 
Curtis ShullFounderAuthor Commented:


I tried this too!

**Error** Symbol=menu, layer=Layer 1, frame=1:Line 18: ')' or ',' expected
         loadVariables("GetDetails.asp?Record=", add String(CurrentRecord), this)
0
 
jack_p50Commented:
the "add" operator is now deprecated. to add two strings use the "+" operator. in your case:
loadVariables("GetDetails.asp?Record=" + String(CurrentRecord), this)
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
seifipCommented:
loadVariables("GetDetails.asp?Record=" + String(CurrentRecord), this);
0
 
jack_p50Commented:
seifip i posted the same line
0
 
seifipCommented:
sry... havent read it before =D
0
 
muxxterCommented:
For string concatenation, Flash MX still supports "add". But Flash 8 no longer does, use "+".

However, that error sounds more like you for got to close a ")" on a previous line.

Check whatever has "( )", just before the loadVariables(). Either an "if" statement, function call, or function header. And just make sure all the parentheses are closed.

Cheers
MuXx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.