3 Replies Latest reply on Oct 8, 2009 8:11 AM by sellador315

    Banging my head against a brick wall, please help!

    sellador315 Level 1

      Hi can someone please help me.

       

      I keep coming up against this error, sometimes I manage to get rid of it through hours of tinkering, but still have not found out why it comes up. On theis new site i'm working on, i just can't get rid of it period.

       

      Here is the error.

       

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

      at workinprogress_fla::MainTimeline/frame21()

      at flash.display::MovieClip/gotoAndStop()

      at workinprogress_fla::MainTimeline/clickMenus()

      And here is the code on Frame 21.
      pic1.addEventListener(MouseEvent.CLICK, clickpic1);
      function clickpic1 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic1");
      }
      pic2.addEventListener(MouseEvent.CLICK, clickpic2);
      function clickpic2 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic2");
      }
      pic3.addEventListener(MouseEvent.CLICK, clickpic3);
      function clickpic3 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic3");
      }
      pic4.addEventListener(MouseEvent.CLICK, clickpic4);
      function clickpic4 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic4");
      }
      pic5.addEventListener(MouseEvent.CLICK, clickpic5);
      function clickpic5 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic5");
      }
      pic6.addEventListener(MouseEvent.CLICK, clickpic6);
      function clickpic6 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic6");
      }
      pic7.addEventListener(MouseEvent.CLICK, clickpic7);
      function clickpic7 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic7");
      }
      pic8.addEventListener(MouseEvent.CLICK, clickpic8);
      function clickpic8 (evtobj:MouseEvent) {
      //go to the section clicked on i.e menu page!
      gotoAndStop ("pic8");
      }
      Can someone please help me out.
      Thanks
      Tom

        • 1. Re: Banging my head against a brick wall, please help!
          tripleA999

          i think you are missing some instances or movieclip names or they are not on stage

          • 2. Re: Banging my head against a brick wall, please help!
            Ned Murphy Adobe Community Professional & MVP

            That error usually means something is out of scope of the code trying to work with it, such as the pics not being present when that code executes, possibly being somewhere down a timeline.  There are other possible reasons as well, such as misnaming an instance.

             

            If you go to your Publish Settings, in the Flash section there is an option to Permit debugging.  If you select that option your error message may also point to a line number following the frame indication.

            • 3. Re: Banging my head against a brick wall, please help!
              sellador315 Level 1

              thanks for your replys.

               

              I have debugged the movie, and it is now saying the following

               

              Attemping to launch and connect to Player using URL /Volumes/Documents/Sketch Collective/Web Sketch/On the Go/Fuggles Website/Flash/Green Website/workinprogress.swf

              [SWF] Volumes:Documents:Sketch Collective:Web Sketch:On the Go:Fuggles Website:Flash:Green Website:workinprogress.swf - 2383999 bytes after decompression

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

              at workinprogress_fla::MainTimeline/frame21()[workinprogress_fla.MainTimeline::frame21:47]

              at flash.display::MovieClip/gotoAndStop()

              at workinprogress_fla::MainTimeline/clickMenus()[workinprogress_fla.MainTimeline::frame11:13 ]

               

              I am still clueless, every instance name seems absolutely fine and all in place.

               

              Any ideas?