错误闪光输出类型错误1009:无法访问空对象引用的属性或方法 [英] Error flash output TypeError 1009:Cannot access a property or method of a null object reference
本文介绍了错误闪光输出类型错误1009:无法访问空对象引用的属性或方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么我得到的输出类型错误:错误#1009:无法访问空对象引用的属性或方法
`在Untitled_1_fla :: MainTimeline / ASD()`
这是我的code
stage.addEventListener(Event.ENTER_FRAME,ASD)
功能ASD(五:事件){
如果(test.pemukul.hitTestObject(musuh)){
musuh.visible = FALSE
}
}
解决方案
一些对象,您试图访问为空 因此检查这个对象:
测试
pemukul
musuh
Why i get output TypeError: Error #1009: Cannot access a property or method of a null object reference.
`at Untitled_1_fla::MainTimeline/asd()`
this my code
stage.addEventListener(Event.ENTER_FRAME,asd)
function asd(e:Event){
if(test.pemukul.hitTestObject(musuh)){
musuh.visible=false
}
}
解决方案
some object you trying to access is null so check this objects:
test
pemukul
musuh
这篇关于错误闪光输出类型错误1009:无法访问空对象引用的属性或方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文