Error 1084: Syntax error: expecting rightparen before leftbrace.
I'm taking this from the documentation:
The expression was unexpected at this point. If the error says "Expecting right brace before end of program," a block of code is missing a closing brace (}).
If the error says "Expecting left parenthesis before _," you may have omitted a parenthesis from a conditional expression, as shown in the following example, which is intentionally incorrect:
-
var fact:int = 1 * 2 * 3;
-
if fact> 2 {
-
var bigger:Boolean = true;
-
}
In my code, the problem was there was no closing parenthesis in the if statement.
-
// notice there is no closing ")" in the statement below
-
if (myClass.hasOwnProperty(id) {
-
trace("dude is in a pop up");
-
}
Please reply in the comments below if this helped you or not. You can also use the Error Lookup Tool to look up Flex compiler or runtime errors. more info...
I had this error inside the mxml. The error "Expecting left parenthesis before _," also occur even if the you are missing a "single quote" for string. Something like this:
Worst part is, it does not give you a specific line number to where the error occured.
Thanks for your info.
i can't seem to figure out why this code isnt' working....i get an error for this code, but everything seems to be fine. Can you help?
btn_circle2.addEventListener(MouseEvent.CLICK, moveRight);
function moveRight(e:MouseEvent):void{
mc_box .x ++5;
}
hi jenyffer,
try:
mc_box .x = mc_box.x + 5;
btw you will find a great community of flash development help here http://forums.adobe.com/community/flash/flash_general