How to solve Error#1009?
i getting getting error #1009 when add if loop working code. prior lines added worked fine. can please tell me why getting error , how avoid it? here error message , relevant code:
typeerror: error #1009: cannot access property or method of null object reference.
@ piedacoulisse_hits_fla::maintimeline/reset()
@ piedacoulisse_hits_fla::maintimeline/blockit()
function reset(event:event):void{
if(contactpoint == "top"){
if(startmovex > event.currenttarget.x){ // problem line
body_mc.x = body_mc.x - 2;
}else if(startmovey>event.currenttarget.y){ // problem line
body_mc.y = body_mc.y - 2; // problem line
} // problem line
}else if(contactpoint == "bottom"){
slider_mc.x = slider_mc.x + 2;
}else if(contactpoint == "body"){
body_mc.y = body_mc.y - 2;
}
}
function blockit(event:event):void{
if(topmask.hittestobject(phone_mc) == true){
reply.text = "top hit";
event.currenttarget.stopdrag();
contactpoint = "top";
reset(null);
}
possibly not getting body_mc movieclip put trace before it
and see getting.
More discussions in ActionScript 3
adobe
Comments
Post a Comment