2 Replies Latest reply on Jun 13, 2007 10:51 AM by adamon

    error 1009 buttons

    adamon
      I have used the following code:

      stop();

      cap_Btn.addEventListener(
      MouseEvent.MOUSE_DOWN,
      function(evt:MouseEvent):void {
      gotoAndPlay("_cap");
      }
      );

      samp_Btn.addEventListener(
      MouseEvent.MOUSE_DOWN,
      function(evt:MouseEvent):void {
      gotoAndPlay("_samp");
      }
      );

      and received this error when I click on the button:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at MethodInfo-63()

      What am I doing wrong?

      Thanks in advance for any help with this issue.

      Rob
        • 1. Re: error 1009 buttons
          kglad Adobe Community Professional & MVP
          you're not referencing a movieclip for flash to locate "_cap" and "_samp".

          where are those frames labels? in cap_Btn and samp_btn, resp? both on the main timeline? elsewhere?
          • 2. Re: error 1009 buttons
            adamon Level 1
            The frame labels are located within a movie that is in the main scene. The two buttons are also located in that movie. I also get that error message when I click a button that is not in that movie. The button is located in the main scene. You can see the error code at visionaryfusion.com. It is in the work section of the site, capabilities or our work.

            Thanks again for your help.

            Rob