Skip to main content
Inspiring
July 12, 2021
Answered

TypeError A term is undefined and has no properties

  • July 12, 2021
  • 1 reply
  • 389 views

Hello again sorry for coming back so early but i have this error

 

if (objMode == null) {
objMode = new battle_mode_mc;
mSystem.contMENU2.addChild(objMode);
objMode.btn_insane.addEventListener(MouseEvent.CLICK, modeInsaneClick, false, 0, true);      <--- this is the line it says is undefined and has no properties
///
objMode.btn_insane.visible = false;
///
_area_select = AREA;
_battle_mode = 1;

 

 

private function modeInsaneClick(event:MouseEvent):void {
_battle_mode = 4;
var clip = new battle_mc;
clip.init(mSystem, _area_select, _battle_mode);
destroy();

}

 

This topic has been closed for replies.
Correct answer Xerney

I managed to figure this out if you have a term that is undefined it means the button/image you put in does not have a instance name and it needs one 🙂

so hope this helps if anyone else has this issue

1 reply

XerneyAuthorCorrect answer
Inspiring
July 12, 2021

I managed to figure this out if you have a term that is undefined it means the button/image you put in does not have a instance name and it needs one 🙂

so hope this helps if anyone else has this issue

Legend
July 12, 2021

Nothing ever doesn't have an instance name. If you don't give a clip an instance name at authoring time, it will be automatically assigned one at runtime.