4 Replies Latest reply on Jul 26, 2012 5:21 AM by Ned Murphy

    Keep getting error #1009


      I have a flash page with 6 button links: HOME   ABOUT   HISTORY   THE CAST   BIOS   GETTICKETS

      I have a linke to a page in the middle, a volume off button and a facebook link.

      Everything will play fine but when I click on the "BIOS" link and go back to the "HOME" page I get the error message:

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

      at Untitled_fla::MainTimeline/frame1()

      at flash.display::MovieClip/gotoAndStop()

      at Untitled_fla::MainTimeline/gohome1()


      And I can no longer click on the Facebook page or the link in the middle of the page but the link to "GETTICKETS" work with no problem. Anyone have any idea? My code is below.



      home1.addEventListener(MouseEvent.CLICK, gohome1);

      function gohome1 (event:MouseEvent):void{

      about1.addEventListener(MouseEvent.CLICK, goabout1);

      function goabout1 (event:MouseEvent):void{

      history1.addEventListener(MouseEvent.CLICK, gohistory1);

      function gohistory1 (event:MouseEvent):void{

      cast.addEventListener(MouseEvent.CLICK, gocast);

      function gocast (event:MouseEvent):void{

      bios.addEventListener(MouseEvent.CLICK, gobios);

      function gobios (event:MouseEvent):void{

      tickets.addEventListener(MouseEvent.CLICK, news);

      function news(event:MouseEvent):void{
         var newsLink:URLRequest = new URLRequest("http://www.cnn.com");
         navigateToURL(newsLink, "_blank");


      function facelook(event:MouseEvent):void{
         var facelookLink:URLRequest = new URLRequest("http://www.facebook.com/");
         navigateToURL(facelookLink, "_blank");

      standard.addEventListener(MouseEvent.CLICK, stand);

      function stand(event:MouseEvent):void{
         var standLink:URLRequest = new URLRequest("http://www.thestandard.com");

          navigateToURL(standLink, "_blank");


        • 1. Re: Keep getting error #1009
          Ned Murphy Adobe Community Professional & MVP

          The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....


          - is declared but not instantiated

          - doesn't have an instance name (or the instance name is mispelled)

          - does not exist in the frame where that code is trying to talk to it

          - is animated into place but is not assigned instance names in every keyframe for it

          - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).


          If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

          1 person found this helpful
          • 2. Re: Keep getting error #1009
            pc234 Level 1

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

            at Untitled_fla::MainTimeline/frame1()[Untitled_fla.MainTimeline::frame1:9]

            at flash.display::MovieClip/gotoAndStop()

            at Untitled_fla::MainTimeline/gohome1()[Untitled_fla.MainTimeline::frame1:6]


            Is the mesage I got back.

            • 3. Re: Keep getting error #1009
              bhargavi reddy Level 1

              I think the error is in


              SoundMixer.stopAll() line as per your error message.


              once check with SoundMixer whether it is existed or not, If exists instance name is correct or not.


              Then also check with stopAll() function.


              Did you define that function?

              • 4. Re: Keep getting error #1009
                Ned Murphy Adobe Community Professional & MVP

                The error message is pointing at line 9 of frame 1 in the main timeline.  You need to determine why the object being targeted in that line does not exist as far as the code sees it.