Skip navigation
pc234
Currently Being Moderated

Keep getting error #1009

Jul 25, 2012 3:03 PM

Tags: #error1009

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.

 

stop();

home1.addEventListener(MouseEvent.CLICK, gohome1);

function gohome1 (event:MouseEvent):void{
   gotoAndStop(1);
}

about1.addEventListener(MouseEvent.CLICK, goabout1);

function goabout1 (event:MouseEvent):void{
   gotoAndStop(2);
   SoundMixer.stopAll()
}


history1.addEventListener(MouseEvent.CLICK, gohistory1);

function gohistory1 (event:MouseEvent):void{
   gotoAndStop(3);
   SoundMixer.stopAll()
  
}

cast.addEventListener(MouseEvent.CLICK, gocast);

function gocast (event:MouseEvent):void{
   gotoAndStop(4);
   SoundMixer.stopAll()
}

bios.addEventListener(MouseEvent.CLICK, gobios);

function gobios (event:MouseEvent):void{
   gotoAndStop(5);
   SoundMixer.stopAll()
}

tickets.addEventListener(MouseEvent.CLICK, news);

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

facebook2.addEventListener(MouseEvent.CLICK,facelook);

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");

}
    
  
  
  
  

 
Replies
  • Currently Being Moderated
    Jul 25, 2012 3:18 PM   in reply to pc234

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 25, 2012 9:28 PM   in reply to pc234

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 26, 2012 5:21 AM   in reply to pc234

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points