Error #1009 in Flash Menu for Website
I can't for the life of me seem to find the problem with this 1009 error.
I have a Flash Menu as a header for my website with the following actionscript:
//residential button
resBtn.addEventListener(MouseEvent.CLICK, resLink);
function resLink(event:MouseEvent):void {
navigateToURL(new URLRequest("residential.html"));
}
//commercial button
commBtn.addEventListener(MouseEvent.CLICK, commLink);
function commLink(event:MouseEvent):void {
navigateToURL(new URLRequest("commercial.html"));
}
//leisure button
leisBtn.addEventListener(MouseEvent.CLICK, leisLink);
function leisLink(event:MouseEvent):void {
navigateToURL(new URLRequest("leisure.html"));
}
//home button
homeBtn.addEventListener(MouseEvent.CLICK, homeLink);
function homeLink(event:MouseEvent):void {
navigateToURL(new URLRequest("home.html"));
Debugger returns with:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at introMenu_fla::MainTimeline/frame43()[introMenu_fla.MainTimeline::frame43:3]
All instances are correctly named and I get no syntax errors exporting from Flash.
It's only when I preview in browser or live preview in Dreamweaver that I get the error.
Is there Javascript or something that I'm missing? Any help would be gratefully received!!
Cheers