A term is undefined and has no properties.
my project working getting error in output window. creating catching game , error appears when object hits catcher. mean?
here exact error:
typeerror: error #1010: term undefined , has no properties.
@ stage2/moveobjects()
and here error in moveobjects function:
public function moveobjects(e:event) {
(var i: int = objects.length -1; >= 0; i--) {
objects[i].y += speed;
addchild(objects[i]);
if(objects[i].hittestobject(boundary)) {
removechild(objects[i]);
objects.splice(i, 1);
}
if (objects[i].hittestobject(catcher.mouth_mc)) {
if (objects[i].typestr == "liquid") {
score += 5;
soundfx_1.play();
catcher.mouth_mc.gotoandplay(9);
}
else
{
score -= 5;
soundfx_2.play();
catcher.mouth_mc.gotoandplay(2);
}
if (score < 0) score = 0;
scoredisplay.text = string(score);
removechild(objects[i]);
objects.splice(i, 1);
}
if (fl_secondselapsed == 0)
{
removechild(objects[i]);
objects.splice(i, 1);
}
catcher.x = mousex;
checkstageborder();
}
}
go flash publish settings , select option permit debugging. can including line number of code generates error. repost complete error message after doing so.
More discussions in ActionScript 3
adobe
Comments
Post a Comment