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");
}
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.
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::frame 1:6]
Is the mesage I got back.
North America
Europe, Middle East and Africa
Asia Pacific