Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Error 1084: Expecting right brace before end of program. Same error shows up on line 52 twice. Please help! I am trying to make a hexagon a circle race.

Avatar

Avatar
Ignite 1
Level 1
mackenziej14390
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
View profile

Avatar
Ignite 1
Level 1
mackenziej14390
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
View profile
mackenziej14390
Level 1

31-01-2016

package  {

  import flash.display.MovieClip;

  import flash.events.Event;

  public class GameStates extends MovieClip {

  public var winnder:String;

  pulbic function GameStates() {

  // constructor code

  }

  public function sayWelcome():void {

  trace("Welcome to my game!");

  }

  public function moveNext():void {

  gotoAndStop(currentFrame + 1);

  }

  public function movePrev():void {

  gotoAndStop(currentFrame - 1);

  }

  public function startGame():void {

  addEventListener(Event.ENTER_FRAME, moveHexagon);

  addEventListener(Event.ENTER_FRAME, moveCircle);

  }

  public function moveCircle(e:Event):void {

  circle_mc.x += 10;

  if (circle_mc.x > 440) {

  removeEventListener(Event.ENTER_FRAME, moveCircle);

  removeEventListener(Event.ENTER_FRAME, moveHexagon);

  winner = "Circle";

  winner_txt.text = winner + " won the race!";

  }

  }

  public function moveHexagon(e:Event):void {

  hexagon_mc.x += 5;

  if (hexagon_mc.x > 440) {

  removeEventListener(Event.ENTER_FRAME, moveCircle);

  removeEventListener(Event.ENTER_FRAME, moveHexagon);

  winner = "Hexagon";

  winner_txt.text = + " won the race!";

  }

}