Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-21-2012, 06:49 PM   PM User | #1
dougcollins02
New Coder

 
Join Date: Dec 2011
Posts: 85
Thanks: 15
Thanked 5 Times in 5 Posts
dougcollins02 is on a distinguished road
Removing Extra Line in Multiline Input Text (AS3)

I'm trying to put an input text field on of my Flash projects, but whenver I put in a multiline input field Flash always changes the input field from completely empty to having an extra line in the text field.

This is a problem as I'm using a code to validate that the field is not empty (which is not the problem-- the code works fine with an input text component, but not one that's drawn on the stage).

Does anyone know how to get rid of this m!@&#r fu#$%*g line? It's driving me nuts.
__________________
What you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
dougcollins02 is offline   Reply With Quote
Old 06-04-2012, 04:28 PM   PM User | #2
dougcollins02
New Coder

 
Join Date: Dec 2011
Posts: 85
Thanks: 15
Thanked 5 Times in 5 Posts
dougcollins02 is on a distinguished road
*bump* Anyone? **crickets**
__________________
What you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
dougcollins02 is offline   Reply With Quote
Old 06-04-2012, 05:01 PM   PM User | #3
Lerura
Regular Coder

 
Lerura's Avatar
 
Join Date: Aug 2005
Location: Denmark
Posts: 869
Thanks: 0
Thanked 112 Times in 111 Posts
Lerura will become famous soon enough
if you took you time to post your code, then someone here would probaly be able to help.

Without the code, noone will able to help you.
Lerura is offline   Reply With Quote
Old 06-05-2012, 06:13 PM   PM User | #4
dougcollins02
New Coder

 
Join Date: Dec 2011
Posts: 85
Thanks: 15
Thanked 5 Times in 5 Posts
dougcollins02 is on a distinguished road
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.
__________________
What you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
dougcollins02 is offline   Reply With Quote
Old 06-06-2012, 02:21 AM   PM User | #5
Lerura
Regular Coder

 
Lerura's Avatar
 
Join Date: Aug 2005
Location: Denmark
Posts: 869
Thanks: 0
Thanked 112 Times in 111 Posts
Lerura will become famous soon enough
Quote:
Originally Posted by dougcollins02 View Post
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.
Your code works as intended? Why are you then posting for help to fix a problem with.

And how should we be able to help you if we can't determine what causes it.
Unless you post some code, we will have no chance to spot the error.
There is no universal fix.

Okay you gave us a little code anyway!

The only thing I can tell you for now is that the text you write in a input text box is refered to as .value not .text even if it might work insome browser

Last edited by Lerura; 06-06-2012 at 02:26 AM..
Lerura is offline   Reply With Quote
Old 06-06-2012, 05:46 PM   PM User | #6
dougcollins02
New Coder

 
Join Date: Dec 2011
Posts: 85
Thanks: 15
Thanked 5 Times in 5 Posts
dougcollins02 is on a distinguished road
It's just not worth arguing over. My points have been made. That said, don't replace .text with .value; it could break your code (it did in my situation).
__________________
What you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.

Last edited by dougcollins02; 06-06-2012 at 06:30 PM.. Reason: There's just no point in dragging this out, and Lerura's usually a helpful user.
dougcollins02 is offline   Reply With Quote
Reply

Bookmarks

Tags
as3, extra, if/else, input text, line

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:52 PM.


Advertisement
Log in to turn off these ads.