Defined things, not defined again... HTML5 Canvas
Cannot read property 'b_Title' of undefined ... yet it is indeed defined.
This is the offending code:
this.p_Button.addEventListener("click", APDHMIDM.bind(this)); // error-free
function b_Lang(){
if( IsRussia == 1){
this.p_Button.b_Title.text = ru_APDHMIDM;
}
else{
this.p_Button.b_Title.text = en_APDHMIDM;
}
}
b_Lang();
I am differentiating between two languages for a button label to display. This is the code I have been using all along with Zero issues:
this.p_Button.addEventListener("click", APDHMIDM.bind(this));
this.p_Button.b_Title.text = en_APDHMIDM;
So, if property 'b_Title' is defined there, why isn't it in a simple else if function?
Ideas, anyone? Thanks.
