ActionScript3 Error #1009: Cannot access a property or method of a null object reference
Having an issue with creating a website in Animate CC with ActionScript3.
Any help would be appreciated.
Basically I am trying to get buttons "home" "about" "services" "contact" to work when clicked.
import flash.events.MouseEvent;
stop();
header_mc.home_btn.addEventListener(MouseEvent.CLICK, gohome);
function gohome (event:MouseEvent):void{
gotoAndStop(1);
}
header_mc.about_btn.addEventListener(MouseEvent.CLICK, goabout);
function goabout (event:MouseEvent):void{
gotoAndStop(2);
}
header_mc.services_btn.addEventListener(MouseEvent.CLICK, goservices);
function goservices (event:MouseEvent):void{
gotoAndStop(3);
}
header_mc.contact_btn.addEventListener(MouseEvent.CLICK, gocontact);
function gocontact (event:MouseEvent):void{
gotoAndStop(4);
}
Ran test after permitting debugging and got
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at WORKINGwebsite_fla::MainTimeline/frame1()[WORKINGwebsite_fla.MainTimeline::frame1:3]
