actionscript - "Access of possibly undefined property buttonMode through a reference with static type Class" and other errors -


i'm making quiz in flash tech class , error, , "1061: call possibly undefined method addeventlistener through reference static type class.". here code

black_mc.buttonmode = true; red_mc.buttonmode = true; purple_mc.buttonmode = true;  black_mc.addeventlistener(mouseevent.click, feedback); red_mc.addeventlistener(mouseevent.click, feedback); purple_mc.addeventlistener(mouseevent.click, feedback);  function feedback(event:mouseevent):void {       if (event.target.name == "black_mc")  {       feedback_txt.text = "bruh thats black rectangle lmao";  }  else if(event.target.name=="red_mc")  {      feedback_txt.text = "you flaggin man thats red square lolol";      event.target.parent.removechild(event.target);  }  else if(event.target.name=="purple_mc")  feedback_txt.text = "ayyyy got bruh!"  event.target.parent.removechild(event.target);  } 

i checked linkage symbols , they're fine. no idea why error there


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -