Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error #1086: syntax error

Explorer ,
Dec 17, 2022 Dec 17, 2022

Hey, people! I am again experiencing problems with AS3.0. This time, it says my code is with syntax error, but I KNOW by heart that it is perfect. I guess I am having memory issues again. What do I do? Thanks!

672
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2022 Dec 17, 2022

what's the line of code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 17, 2022 Dec 17, 2022

It says that is in the frame 31 line 1, but there is NO CODE there! I suppose it's another memory problem, but I don't know how to solve it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2022 Dec 17, 2022

no, 1086 is not a memory problem. you wrote code that's causing the error.

 

eg, you used used a colon where there should be a semicolon.

 

copy and paste here the error message.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 17, 2022 Dec 17, 2022

I've posted above.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2022 Dec 17, 2022

there's no error in the code you showed.  look for another layer with actionscript (a)

 

kglad_0-1671331028743.pngexpand image

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 17, 2022 Dec 17, 2022

That's my point: there is no error in the code. I have tried to continue my work with Animate (I was using Flash CS6) and everything went fine. I guess the problem is with Flash, really. Maybe I should uninstall and then reinstall it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2022 Dec 17, 2022

click file>publish settings>and tick "permit debugging"

 

retest and post a screenshot of the error message and your main timeline (if that's the timeline in the error message).

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 17, 2022 Dec 17, 2022

frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.
frame31, Line 1 1086: Syntax error: expecting semicolon before leftbrace.

 

That's what I get for the following code:

 

import flash.events.MouseEvent;

GRUPOA.addEventListener(MouseEvent.CLICK, GrupoA7);

function GrupoA7 (e:MouseEvent):void{
prevFrame();
}

INÍCIO.addEventListener(MouseEvent.CLICK, início30);

function início30 (e:MouseEvent):void{
gotoAndStop(1);
}

GRUPOC.addEventListener(MouseEvent.CLICK, GrupoC);

function GrupoC (e:MouseEvent):void{
gotoAndStop (31);
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2022 Dec 18, 2022
LATEST

Hi.

 

I don't get any error by just using the code you just provided.

 

Anyway, you shouldn't use special characters when naming instances/variables in AS3.

https://help.adobe.com/en_US/as3/learn/WS597e5dadb9cc1e02-6e28df0f130d240d5d7-8000.html#WSc90c6ac367...

 

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines