Syntax error: expecting rightbrace before end of program.

Explorer ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

I'm getting the error in the header inside this function

 

import flash.system.fscommand;
import flash.events.MouseEvent;

restartBtn.addEventListener(MouseEvent.CLICK, restartGame);
quitBtn.addEventListener(MouseEvent.CLICK, exitGame);

function restartGame(event:MouseEvent):void {
	MovieClip(root).deathScreen.x = 1000;
	MovieClip(root).deathScreen.y = 0;

	MovieClip(root).restartBtn.x = 1000;
	MovieClip(root).restartBtn.y = 0;


	MovieClip(root).quitBtn.x = 1000;
	MovieClip(root).quitBtn.y = 0;
	
	MovieClip(this.root).gotoAndPlay(1, "Scene 1");
}

function exitGame(event:MouseEvent):void {
	fscommand("quit");
	System.exit(0);
}

 

to my knowledge nothing was changed since last working copy, any insight would be helpful

TOPICS
ActionScript , Code , Error

Views

57

Likes

Translate

Translate

Report

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

correct answers 1 Correct answer

Explorer , May 02, 2022 May 02, 2022
error was on another file but trace back to that code file shown. 

Likes

Translate

Translate
Adobe Community Professional ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Hi.

 

Your code seems correct to me. Is it complete?

 

Which frame or line does the error come from?

 

Please let us know.

 

Regards,

JC

Likes

Translate

Translate

Report

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 ,
May 02, 2022 May 02, 2022

Copy link to clipboard

Copied

LATEST

error was on another file but trace back to that code file shown. 

 

Likes

Translate

Translate

Report

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