7 Replies Latest reply on Feb 1, 2016 9:47 AM by mackenziej1439023

    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.

    mackenziej1439023 Level 1

      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!";

        }

      }