【发布时间】:2013-05-11 16:21:14
【问题描述】:
TypeError:错误 #1009:无法访问空对象引用的属性或方法。 在 savethetiger_fla::MainTimeline/frame168()
stop();
home_btn.addEventListener(MouseEvent.CLICK,home);
function home(event:MouseEvent){
gotoAndPlay(1,"scene1");
}
aboutus_btn.addEventListener(MouseEvent.CLICK,aboutus);
function aboutus(event:MouseEvent){
gotoAndPlay(1,"Scene2");
}
gallery_btn.addEventListener(MouseEvent.CLICK,gallery);
function gallery(event:MouseEvent){
gotoAndPlay(1,"Scene5");
}
contactus_btn.addEventListener(MouseEvent.CLICK,contactus);
function contactus(event:MouseEvent){
gotoAndPlay(1,"Scene4");
}
【问题讨论】:
-
168 帧上有帧脚本吗?如果有,请发布。
-
'code'stop(); home_btn.addEventListener(MouseEvent.CLICK,home);功能主页(事件:MouseEvent){ gotoAndPlay(1,"scene1"); } aboutus_btn.addEventListener(MouseEvent.CLICK,aboutus);函数 aboutus(event:MouseEvent){ gotoAndPlay(1,"Scene2"); } gallery_btn.addEventListener(MouseEvent.CLICK,gallery);功能画廊(事件:MouseEvent){ gotoAndPlay(1,"Scene5"); } contactus_btn.addEventListener(MouseEvent.CLICK,contactus);函数contactus(event:MouseEvent){ gotoAndPlay(1,"Scene4"); }
-
欢迎来到 stack-overflow,您应该编辑您的问题以将代码粘贴到那里。阅读以调试模式运行您的项目,以便您可以看到有问题的行是什么,一般来说,您使用的是 .取消引用当前为空的变量。
-
确保所有实例名称拼写正确并存在于时间线上:home_btn、contactus_btn、gallery_btn、aboutus_btn
-
TypeError:错误 #1009:无法访问空对象引用的属性或方法。在 savethetiger_fla::MainTimeline/frame168()[savethetiger_fla.MainTimeline::frame168:3]
标签: actionscript-3 flash flash-cs5