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

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

2.5.28 to 3.4.1---Download of update package failed - Joomla! Forum - community, help and support

Your host needs to use PHP 5.3.10 or higher to run this vers - Joomla! Forum - community, help and support