1 Reply Latest reply on Sep 17, 2013 7:02 AM by kglad

    TypeError: Error #1009: Cannot access a property or method of a null object reference.      at Game_fla:

    Vicky_9s

      loder

      stop();

       

       

      addEventListener(Event.ENTER_FRAME, preLoad)

       

       

      function preLoad(event:Event):void{

                var bytestoLoad:Number = loaderInfo.bytesTotal;

                var numberLoaded:Number = loaderInfo.bytesLoaded;

                if (bytestoLoad == numberLoaded){

                          removeEventListener(Event.ENTER_FRAME, preLoad)

                          gotoAndStop(1,"Main_Menu");

                } else {

                          preLoader.preLoaderFill.scaleX = numberLoaded/bytestoLoad;

                          preLoader.bytesPercent.text = Math.floor(numberLoaded/bytestoLoad*100) + "%";

                }

      }

       

      Main mneu

       

      import flash.events.MouseEvent;

      //--How_to_play--\\

      Howtoplay.addEventListener (MouseEvent.CLICK, skipto)

      function skipto(event:MouseEvent):void {

                gotoAndStop(1,"How_to_play")

      }

      //--Scoreboard--\\

      Scoreboard.addEventListener (MouseEvent.CLICK, Next)

      function Next(event:MouseEvent):void {

                gotoAndStop(1,"Scoreboard")

      }

      //--Setting--\\

      Setting.addEventListener (MouseEvent.CLICK, exit)

      function exit(event:MouseEvent):void {

                gotoAndStop(1,"Game_Setting")

      }

      //--Start--\\

      Start.addEventListener (MouseEvent.CLICK, Goto)

      function Goto(event:MouseEvent):void {

                gotoAndStop(1,"Start_Game")

      }

      //--Quit--\\

      Quit.addEventListener (MouseEvent.CLICK, quit)

      function quit(event:MouseEvent):void {

                gotoAndStop(1,"Start_Game")

      }

       

      How ro plat

       

      import flash.events.MouseEvent;

      //--Back--\\

      back.addEventListener (MouseEvent.CLICK, Move)

      function Move(event:MouseEvent):void {

                gotoAndStop(1,"Main_Menu")

      }

       

      Scoreboard


      import flash.events.MouseEvent;

      //--Back--\\

      back.addEventListener (MouseEvent.CLICK, goMM1)

      function goMM1(event:MouseEvent):void {

                gotoAndStop(1,"Main_Menu")

      }