mercredi 15 février 2017

Missing Rightbrace Syntax Error, I don't see any issues

I must be blind or something, as I cannot see what's wrong with my code. I'm just playing around with flash, but I stumbled on this error that I cannot see how to fix.

    package  {
    import flash.display.MovieClip;
    import flash.utils.Timer;
    import flash.events.TimerEvent;

    public class game extends MovieClip{
        public function game() 
        {
            trace("SUCCESS | Constructed Game Class");
            var playerPosKeeper_mc:MovieClip = new mc_PlayerPosKeeper;

            private var timer:Timer = new Timer(3000);

            private var timerFn:Function = new Function(e.TimerEvent){

            }
            timer.addEventListener(TimerEvent.TIMER, timerFn);
            timer.start();
        }
    }
}

I get the error

Line 17 1084: Syntax error: expecting rightbrace before timer.

Aucun commentaire:

Enregistrer un commentaire