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

  • SEARCH
  • Home
  • 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 6078019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:47:10+00:00 2026-05-23T10:47:10+00:00

This is the MXML I have <mx:Text id=name styleName=textStyle maxWidth=400></mx:Text> Then in the same

  • 0

This is the MXML I have

<mx:Text id="name" styleName="textStyle" maxWidth="400"></mx:Text>

Then in the same file I have :

<mx:Script>
    <![CDATA[

    private function init():void
    {
       name.text = data.string;
    }

    ]]>
</mx:Script>

data.string comes from the DB and it contains this :

"This is a string \n with two lines."

I also tried this :

"This is a string &#13; with two lines."

None of them create a new line in flex they are both rendered to the screen as \n and &#13;.

How can I create a new line with a string that is coming from the database?

If I type \n like this in the code it works :

name.text = "test \n test"; 

but if I do name.text=data.string; it doesn’t even though data.string has the exact same value.

  • 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-23T10:47:11+00:00Added an answer on May 23, 2026 at 10:47 am

    If I run this on the string coming from the DB it works:

    string.split("\\n").join("\n");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MXML file, which references an external script file for all its
I have only this in my mxml source code: <?xml version=1.0 encoding=utf-8?> <mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
I have this item renderer MyRenderer.mxml <?xml version=1.0 encoding=utf-8?> <mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml implements=mx.core.IDataRenderer > <mx:Script>
Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can
im developing a simple Mxml application using flex 3. I have used simple text
Hi guys i have a list control in a component mxml file. I have
This is what i have: Main.mxml: <fx:Style source=Main.css/> <s:TextInput x=72 y=95 focusColor=#CECB02 prompt=E-mail: skinClass=components.TextInputSkin/>
I have this custom toolTip: <?xml version=1.0 encoding=utf-8?> <mx:VBox xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx implements=mx.core.IToolTip creationPolicy=all
I have a flex project with a mx:Text. i have a class that is
I have a flex MXML UI that is building a set of radio buttons

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.