• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Keep getting error #1009

New Here ,
Jul 25, 2012 Jul 25, 2012

Copy link to clipboard

Copied

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

}
    
  
  
  
  

TOPICS
ActionScript

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 25, 2012 Jul 25, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2012 Jul 25, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 25, 2012 Jul 25, 2012

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 26, 2012 Jul 26, 2012

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines