问题
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
}
}
回答1:
some object you trying to access is null so check this objects:
test
pemukul
musuh
来源:https://stackoverflow.com/questions/24530439/error-flash-output-typeerror-1009cannot-access-a-property-or-method-of-a-null-o