Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7442593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:11:57+00:00 2026-05-29T11:11:57+00:00

I have an issue with a specific string variable. It is automatically adding a

  • 0

I have an issue with a specific string variable. It is automatically adding a line break after the text in the string characterName. On this frame I have a input text box with an instance name of name_Input and a submit button that executes the following code.

   var characterName:String;
   characterName = name_Input.text;
   //The next line was a solution I tried for this problem but it doesn't work
   characterName = characterName.split("\r\n").join("");
   nextFrame();

And on the next frame there is a trace to see what the value of that plus another variable is.

   trace(characterName+", the "+characterClass);

characterClass is automatically defined as “Default” so I can see if it worked properly.
The trace is displaying the following:

   "Name
   , the Default"

If anyone can help me figure out why the line break keeps showing up and how to prevent this, I would greatly appreciate it.

Also, if I hit the delete key before typing “Name” in the text box, it displays in line. So clearly the box has a line break in it automatically. I’ve already tried deleting and remaking the text box to make sure I hadn’t accidentally added something to it.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:11:58+00:00Added an answer on May 29, 2026 at 11:11 am

    Make sure your Text Field is Single Line and not Multi Line in it’s properties.

    If that doesn’t work, you can also try something like:
    yourstring.replace(String.fromCharCode(13), “”)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen a few posts regarding this issue but not one specific to
I have a complex json array which I want to target a specific line/string
I have a very odd issue. When I execute a specific database stored procedure
i have a issue with some string formats, i'm forcing the culture when formatting
Hello I have an issue with debugging code of my UserControls. I am adding
I surfed through existant questions regarding this theme, but my issue is little specific
I have come across this issue a few times now, and each time I
I have a strange issue specific to my Django deployment under Python 2.6 +
Yes, I realize this question was asked and answered, but I have specific questions
EDIT: I have added Slug column to address performance issues on specific record selection.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.