该死的错误#1009!
我正在为一位拥有水疗中心的朋友构建一个简单的 Flash 网站。
我不断收到此错误:
Error #1009: Cannot access a property or method of a null object reference.
at spa7_fla::MainTimeline/frame1()
通过注释掉代码的过程,我已经缩小到我的链接部分:
vox_link.addEventListener(MouseEvent.CLICK,gotoVox);
function gotoVox(evtObj:Event):void {
var voxSite:URLRequest=new URLRequest("http://www.voxmundiproject.com");
navigateToURL(voxSite, "_blank");
}
注释掉此部分后,我不会收到 1009 错误。当代码处于活动状态时, 我得到了错误。
我的代码语法是正确的,所以我很困惑。
有人知道我错了什么吗?
谢谢!
I'm building a simple flash site for a friend who has a spa.
I keep getting this error:
Error #1009: Cannot access a property or method of a null object reference.
at spa7_fla::MainTimeline/frame1()
through the process of commenting out code, i've narrowed down to my link section:
vox_link.addEventListener(MouseEvent.CLICK,gotoVox);
function gotoVox(evtObj:Event):void {
var voxSite:URLRequest=new URLRequest("http://www.voxmundiproject.com");
navigateToURL(voxSite, "_blank");
}
With this section commented out, i don't get the 1009 error. When the code is active,
I get the error.
My code syntax is correct so I'm stumped.
Does someone have an idea what my be wrong?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该错误表明您正在使用一个为空的对象(访问方法/属性)。据我所知,可能是 vox_link 这里为空或不存在。
The error says that you are using an object (accessing methods/properties) that is null. From what I see, it's probably vox_link that is null here or does not exist.
这是一个非常晚的响应 XD,但请尝试使用 URLLoader 而不是 URLRequest
THis is a very late response XD but try URLLoader instead of URLRequest