错误闪光输出类型错误1009:无法访问空对象引用的属性或方法错误、闪光、属性、无法访问

由网友(枯木逢春)分享简介:为什么我得到的输出类型错误:错误#1009:无法访问空对象引用的属性或方法`在Untitled_1_fla :: MainTimeline / ASD()`这是我的code stage.addEventListener(Event.ENTER_FRAME,ASD)功能ASD(五:事件){如果(test.pemukul...

为什么我得到的输出类型错误:错误#1009:无法访问空对象引用的属性或方法

 `在Untitled_1_fla :: MainTimeline / ASD()`
 

这是我的code

  stage.addEventListener(Event.ENTER_FRAME,ASD)
功能ASD(五:事件){
    如果(test.pemukul.hitTestObject(musuh)){
        musuh.visible = FALSE
    }
}
 

解决方案

一些对象,您试图访问为空 因此检查这个对象:

 测试
pemukul
musuh
 
英雄联盟选择服务器提示TypeError Error 1009 无法访问空对象引用的属性或方法

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

阅读全文

相关推荐

最新文章