if/else statement not recognizing text input component
Just a bump of my old topic. I'm using the built in text input field component with an if else statement. First see my code:
this.button1.addEventListener('click', bF.bind(this));
function bF(){
if (this.toName.text == "") {
this.status.text = "please enter a to name";
} else {
this.gotoAndStop(1);
this.status.text = "Sending Ecard - Please Hold";
}}
(this is just a quick sample)
status is a dynamic textbox and correctly displays its message of sending ecard.
toName is the text input component... and it's being completely ignored. even left blank, it still pushes the sending message. just to test, i made toName a dynamic text and left it blank, the above code recognized it as blank and status gave me "please enter..."
now I'm not sure, but maybe I have to utilize this following code somehow... maybe someone out there knows?:
dom_overlay_container.children["toName"].???;
the ??? just means "can I put something here that lets my if else statement recognize it the same way it recognizes my dynamic text example?"
Thanks for your time!
