Seriously, Lerura? This is
**not** a problem with my code. It works as designed. This is a general question revolving around an input text box, and how to stop it from displaying a second line. Unsurprisingly, no one in this forum has been remotely helpful in answering this question, Lerura included.
Seriously, the people in this forum are the most unhelpful and sarcastic lot around. I hate coming here for help because the members are always as petulant as the post above. I've always been polite to be careful and respectful when asking a question. The vast majority of responses I've gotten have been as high-and-mighty as the one here. With the exception of a very small number of genuinely helpful and understanding users, I get the feeling that everyone here users their tech skills to "look down upon the masses" and feel superior to others.
Case in point: Lerura's response was meant to show her(?) mental superiority by implying that I was too stupid to know that I would have to supply code to receive help. If I humbly submitted my coding work, her noble self would be bothered to take the time to help me out.
Seriously, how condescending can you get? I've always hated to see these type of responses on these forums. It's polite to ask questions about someone's code, if you think it's relevant. It's even perfectly acceptable to ask them to post code, but for God's sake don't be a jerk about it. Is that too much to ask?
I know most of us asking questions are beginning to intermediate coders who need some help going in the right direction. I know most of us answering questions are experienced coders taking time to help out (and possibly build some of their own skills in the process). It's a great system, but for the love of all that's good and holy, if someone asks you for help, either make a genuine, friendly attempt to help them or stay out of it. Being a jerk doesn't get anyone anywhere, and only dissuades people from asking for help in the future.
As it happens, I had this exact question answered on another forum some time ago, without submitting any code. I was bumping here to see what kind of response I'd get. And guess what? It was exactly the type of response I expected. Rude and petulant.
For the sake of anyone who comes looking for this answer in the future, I'm going to go ahead and answer my own question, since no one else here seems to be able to do so. I'm also going to warn them against posting even the simplest questions here, if they're not big fans of verbal abuse.
As it turns out, you only need one very simple line of code to fix this problem. To solve it, you simply put the following at the start of your action script, before any function:
Code:
inputField.text = "";
...where inputField is the instance name of your input text box.
This will effectively remove any difficulty with a second line showing up in an input text box, and is very useful in solving in problems when checking for a blank text field in using if/else statements in AS3.